updated to angular-2.0.0 (final)
This commit is contained in:
		
							parent
							
								
									a59ab194c3
								
							
						
					
					
						commit
						0cf6eeaedf
					
				
					 9 changed files with 94 additions and 77 deletions
				
			
		|  | @ -1,7 +1,7 @@ | ||||||
| import {Component} from "@angular/core"; | import {Component} from "@angular/core"; | ||||||
| 
 | 
 | ||||||
| import {InputareaComponent} from "./inputarea.component"; | import {InputareaComponent} from "./inputarea.component"; | ||||||
| import {ConversionType} from "./conversiontype"; | // import {ConversionType} from "./conversiontype";
 | ||||||
| //import { SelectorComponent } from "./selector.component";
 | //import { SelectorComponent } from "./selector.component";
 | ||||||
| 
 | 
 | ||||||
| @Component({ | @Component({ | ||||||
|  | @ -10,13 +10,12 @@ import {ConversionType} from "./conversiontype"; | ||||||
|     <div> |     <div> | ||||||
|     <den-inputarea></den-inputarea> |     <den-inputarea></den-inputarea> | ||||||
|     </div> |     </div> | ||||||
|     `,
 |     ` | ||||||
|     directives: [InputareaComponent] |  | ||||||
| }) | }) | ||||||
| export class AppComponent { | export class AppComponent { | ||||||
|     private inputAreas:InputareaComponent[] = []; |     // private inputAreas:InputareaComponent[] = [];
 | ||||||
| 
 |     //
 | ||||||
|     constructor() { |     // constructor() {
 | ||||||
|         this.inputAreas.push(new InputareaComponent()); |     //     this.inputAreas.push(new InputareaComponent());
 | ||||||
|     } |     // }
 | ||||||
| } | } | ||||||
|  |  | ||||||
							
								
								
									
										20
									
								
								app/app.module.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								app/app.module.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | ||||||
|  | import {NgModule} from '@angular/core' | ||||||
|  | import {BrowserModule} from '@angular/platform-browser' | ||||||
|  | import {FormsModule} from '@angular/forms' | ||||||
|  | 
 | ||||||
|  | import {AppComponent} from './app.component' | ||||||
|  | import {InputareaComponent} from "./inputarea.component"; | ||||||
|  | 
 | ||||||
|  | @NgModule({ | ||||||
|  |     imports: [ | ||||||
|  |         BrowserModule, | ||||||
|  |         FormsModule | ||||||
|  |     ], | ||||||
|  |     declarations: [ | ||||||
|  |         AppComponent, | ||||||
|  |         InputareaComponent | ||||||
|  |     ], | ||||||
|  |     bootstrap: [AppComponent] | ||||||
|  | }) | ||||||
|  | export class AppModule { | ||||||
|  | } | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| import {bootstrap} from "@angular/platform-browser-dynamic"; | import {platformBrowserDynamic} from "@angular/platform-browser-dynamic"; | ||||||
| 
 | 
 | ||||||
| import {AppComponent} from "./app.component"; | import {AppModule} from "./app.module"; | ||||||
| 
 | 
 | ||||||
| bootstrap(AppComponent); | const platform = platformBrowserDynamic(); | ||||||
|  | platform.bootstrapModule(AppModule); | ||||||
|  |  | ||||||
							
								
								
									
										23
									
								
								package.json
									
										
									
									
									
								
							
							
						
						
									
										23
									
								
								package.json
									
										
									
									
									
								
							|  | @ -3,7 +3,7 @@ | ||||||
|   "version": "1.0.0-alpha.1", |   "version": "1.0.0-alpha.1", | ||||||
|   "description": "Convert to and fro!", |   "description": "Convert to and fro!", | ||||||
|   "keywords": [ |   "keywords": [ | ||||||
|     "dencode" |     "dencode", "conversion", "converter", "convert" | ||||||
|   ], |   ], | ||||||
|   "author": { |   "author": { | ||||||
|     "name": "Manuel Friedli", |     "name": "Manuel Friedli", | ||||||
|  | @ -13,25 +13,26 @@ | ||||||
|   "homepage": "https://test.friedli.info/~manuel/dencode", |   "homepage": "https://test.friedli.info/~manuel/dencode", | ||||||
|   "repository": "https://gittr.ch/manuel/dencode.org.git", |   "repository": "https://gittr.ch/manuel/dencode.org.git", | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@angular/common": "2.0.0-rc.1", |     "@angular/common": "2.0.0", | ||||||
|     "@angular/compiler": "2.0.0-rc.1", |     "@angular/compiler": "2.0.0", | ||||||
|     "@angular/core": "2.0.0-rc.1", |     "@angular/core": "2.0.0", | ||||||
|     "@angular/platform-browser": "2.0.0-rc.1", |     "@angular/forms": "2.0.0", | ||||||
|     "@angular/platform-browser-dynamic": "2.0.0-rc.1", |     "@angular/platform-browser": "2.0.0", | ||||||
|     "@angular/upgrade": "2.0.0-rc.1", |     "@angular/platform-browser-dynamic": "2.0.0", | ||||||
|  |     "@angular/upgrade": "2.0.0", | ||||||
|     "bootstrap": "^3.3.6", |     "bootstrap": "^3.3.6", | ||||||
|     "core-js": "^2.4.0", |     "core-js": "^2.4.0", | ||||||
|     "reflect-metadata": "^0.1.3", |     "reflect-metadata": "^0.1.3", | ||||||
|     "rxjs": "5.0.0-beta.6", |     "rxjs": "5.0.0-beta.12", | ||||||
|     "systemjs": "^0.19.27", |     "systemjs": "^0.19.27", | ||||||
|     "zone.js": "^0.6.12" |     "zone.js": "^0.6.12" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "concurrently": "^2.0.0", |     "concurrently": "^2.2.0", | ||||||
|     "gulp": "^3.9.0", |     "gulp": "^3.9.0", | ||||||
|     "lite-server": "^2.2.0", |     "lite-server": "^2.2.0", | ||||||
|     "typescript": "^1.8.10", |     "typescript": "^2.0.2", | ||||||
|     "typings": "^1.0.4" |     "typings": "^1.3.2" | ||||||
|   }, |   }, | ||||||
|   "scripts": { |   "scripts": { | ||||||
|     "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\"", |     "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\"", | ||||||
|  |  | ||||||
|  | @ -3,45 +3,41 @@ | ||||||
|  * Adjust as necessary for your application needs. |  * Adjust as necessary for your application needs. | ||||||
|  */ |  */ | ||||||
| (function (global) { | (function (global) { | ||||||
|  |     System.config({ | ||||||
|  |         paths: { | ||||||
|  |             // paths serve as alias
 | ||||||
|  |             'npm:': 'node_modules/' | ||||||
|  |         }, | ||||||
|         // map tells the System loader where to look for things
 |         // map tells the System loader where to look for things
 | ||||||
|     var map = { |         map: { | ||||||
|         'app':                        'app', // 'dist',
 |             // our app is within the app folder
 | ||||||
|         '@angular':                   'node_modules/@angular', |             app: 'app', | ||||||
| //        'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
 |             // angular bundles
 | ||||||
|         'rxjs':                       'node_modules/rxjs' |             '@angular/core': 'npm:@angular/core/bundles/core.umd.js', | ||||||
|     }; |             '@angular/common': 'npm:@angular/common/bundles/common.umd.js', | ||||||
|  |             '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js', | ||||||
|  |             '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js', | ||||||
|  |             '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', | ||||||
|  | //            '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
 | ||||||
|  | //            '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
 | ||||||
|  |            '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js', | ||||||
|  |             // other libraries
 | ||||||
|  |             'rxjs': 'npm:rxjs'//,
 | ||||||
|  | //            'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
 | ||||||
|  |         }, | ||||||
|         // packages tells the System loader how to load when no filename and/or no extension
 |         // packages tells the System loader how to load when no filename and/or no extension
 | ||||||
|     var packages = { |         packages: { | ||||||
|         'app':                        { main: 'main.js',  defaultExtension: 'js' }, |             app: { | ||||||
|         'rxjs':                       { defaultExtension: 'js' }, |                 main: './main.js', | ||||||
| //        'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
 |                 defaultExtension: 'js' | ||||||
|     }; |             }, | ||||||
|     var ngPackageNames = [ |             rxjs: { | ||||||
|         'common', |                 defaultExtension: 'js' | ||||||
|         'compiler', |             }, | ||||||
|         'core', |             'angular2-in-memory-web-api': { | ||||||
|         'http', |                 main: './index.js', | ||||||
|         'platform-browser', |                 defaultExtension: 'js' | ||||||
|         'platform-browser-dynamic', |  | ||||||
|         'router', |  | ||||||
|         'router-deprecated', |  | ||||||
|         'upgrade', |  | ||||||
|     ]; |  | ||||||
|     // Individual files (~300 requests):
 |  | ||||||
|     function packIndex(pkgName) { |  | ||||||
|         packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' }; |  | ||||||
|             } |             } | ||||||
|     // Bundled (~40 requests):
 |  | ||||||
|     function packUmd(pkgName) { |  | ||||||
|         packages['@angular/'+pkgName] = { main: pkgName + '.umd.js', defaultExtension: 'js' }; |  | ||||||
|     }; |  | ||||||
|     // Most environments should use UMD; some (Karma) need the individual index files
 |  | ||||||
|     var setPackageConfig = System.packageWithIndex ? packIndex : packUmd; |  | ||||||
|     // Add package entries for angular packages
 |  | ||||||
|     ngPackageNames.forEach(setPackageConfig); |  | ||||||
|     var config = { |  | ||||||
|         map: map, |  | ||||||
|         packages: packages |  | ||||||
|         } |         } | ||||||
|     System.config(config); |     }); | ||||||
| })(this); | })(this); | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| { | { | ||||||
|   "globalDependencies": { |   "globalDependencies": { | ||||||
|     "core-js": "registry:dt/core-js#0.0.0+20160317120654", |     "core-js": "registry:dt/core-js#0.0.0+20160725163759", | ||||||
|     "jasmine": "registry:dt/jasmine#2.2.0+20160505161446", |     "jasmine": "registry:dt/jasmine#2.2.0+20160621224255", | ||||||
|     "node": "registry:dt/node#4.0.0+20160509154515" |     "node": "registry:dt/node#6.0.0+20160909174046" | ||||||
|   } |   } | ||||||
| } | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue