diff --git a/.gitignore b/.gitignore
index d22d33e..a74b159 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,4 @@ atlassian-ide-plugin.xml
node_modules/
typings/
app/**/*.js
-app/**/*.js.map
\ No newline at end of file
+app/**/*.js.map
diff --git a/app/app.component.ts b/app/app.component.ts
index 7799baf..805b8f6 100644
--- a/app/app.component.ts
+++ b/app/app.component.ts
@@ -1,7 +1,7 @@
-import { Component } from "@angular/core";
+import {Component} from "@angular/core";
-import { InputareaComponent } from "./inputarea.component";
-import {ConversionType} from "./conversiontype";
+import {InputareaComponent} from "./inputarea.component";
+// import {ConversionType} from "./conversiontype";
//import { SelectorComponent } from "./selector.component";
@Component({
@@ -10,13 +10,12 @@ import {ConversionType} from "./conversiontype";
- `,
- directives: [InputareaComponent]
+ `
})
export class AppComponent {
- private inputAreas:InputareaComponent[] = [];
-
- constructor() {
- this.inputAreas.push(new InputareaComponent());
- }
+ // private inputAreas:InputareaComponent[] = [];
+ //
+ // constructor() {
+ // this.inputAreas.push(new InputareaComponent());
+ // }
}
diff --git a/app/app.module.ts b/app/app.module.ts
new file mode 100644
index 0000000..4cf0a38
--- /dev/null
+++ b/app/app.module.ts
@@ -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 {
+}
diff --git a/app/conversioninput.ts b/app/conversioninput.ts
index 0380c28..be417ef 100644
--- a/app/conversioninput.ts
+++ b/app/conversioninput.ts
@@ -3,4 +3,4 @@ import { ConversionType} from "./conversiontype";
export class ConversionInput {
public content:string;
public type:ConversionType;
-}
\ No newline at end of file
+}
diff --git a/app/inputarea.component.ts b/app/inputarea.component.ts
index 290175d..5f7a4b2 100644
--- a/app/inputarea.component.ts
+++ b/app/inputarea.component.ts
@@ -20,18 +20,18 @@ export class InputareaComponent {
public conversions:ConversionType[] = [ConversionType.ENCODE_BASE64, ConversionType.DECODE_BASE64];
private conversion:ConversionInput;
private ConversionType:ConversionType = ConversionType;
-
+
constructor() {
console.log("Aloha, " + this.index);
this.conversion = new ConversionInput();
this.conversion.content = "";
this.conversion.type = ConversionType.DECODE_BASE64;
}
-
+
public update():void {
console.log(this.conversion.content);
}
-
+
public convert(e):void {
this.conversion.type = ConversionType.of(+e.target.selectedOptions[0].id);
console.log(this.conversion.type);
@@ -40,14 +40,14 @@ export class InputareaComponent {
this.conversion.content = "Base64 decode";
break;
case ConversionType.ENCODE_BASE64:
- this.conversion.content = "Base 64 encode";
+ this.conversion.content = "Base64 encode";
break;
default:
this.conversion.content = "Unknown: " + this.conversion.type;
break;
}
}
-
+
public setIndex(index:number):void {
this.index = index;
}
diff --git a/app/main.ts b/app/main.ts
index 04cabf1..af2e54a 100644
--- a/app/main.ts
+++ b/app/main.ts
@@ -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);
diff --git a/package.json b/package.json
index 6b1bf66..923c954 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"version": "1.0.0-alpha.1",
"description": "Convert to and fro!",
"keywords": [
- "dencode"
+ "dencode", "conversion", "converter", "convert"
],
"author": {
"name": "Manuel Friedli",
@@ -13,25 +13,26 @@
"homepage": "https://test.friedli.info/~manuel/dencode",
"repository": "https://gittr.ch/manuel/dencode.org.git",
"dependencies": {
- "@angular/common": "2.0.0-rc.1",
- "@angular/compiler": "2.0.0-rc.1",
- "@angular/core": "2.0.0-rc.1",
- "@angular/platform-browser": "2.0.0-rc.1",
- "@angular/platform-browser-dynamic": "2.0.0-rc.1",
- "@angular/upgrade": "2.0.0-rc.1",
+ "@angular/common": "2.0.0",
+ "@angular/compiler": "2.0.0",
+ "@angular/core": "2.0.0",
+ "@angular/forms": "2.0.0",
+ "@angular/platform-browser": "2.0.0",
+ "@angular/platform-browser-dynamic": "2.0.0",
+ "@angular/upgrade": "2.0.0",
"bootstrap": "^3.3.6",
"core-js": "^2.4.0",
"reflect-metadata": "^0.1.3",
- "rxjs": "5.0.0-beta.6",
+ "rxjs": "5.0.0-beta.12",
"systemjs": "^0.19.27",
"zone.js": "^0.6.12"
},
"devDependencies": {
- "concurrently": "^2.0.0",
+ "concurrently": "^2.2.0",
"gulp": "^3.9.0",
"lite-server": "^2.2.0",
- "typescript": "^1.8.10",
- "typings": "^1.0.4"
+ "typescript": "^2.0.2",
+ "typings": "^1.3.2"
},
"scripts": {
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\"",
diff --git a/systemjs.config.js b/systemjs.config.js
index 4ea7cf2..5ac6290 100644
--- a/systemjs.config.js
+++ b/systemjs.config.js
@@ -2,46 +2,42 @@
* System configuration for Angular 2 samples
* Adjust as necessary for your application needs.
*/
-(function(global) {
- // map tells the System loader where to look for things
- var map = {
- 'app': 'app', // 'dist',
- '@angular': 'node_modules/@angular',
-// 'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
- 'rxjs': 'node_modules/rxjs'
- };
- // packages tells the System loader how to load when no filename and/or no extension
- var packages = {
- 'app': { main: 'main.js', defaultExtension: 'js' },
- 'rxjs': { defaultExtension: 'js' },
-// 'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
- };
- var ngPackageNames = [
- 'common',
- 'compiler',
- 'core',
- 'http',
- 'platform-browser',
- '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);
+(function (global) {
+ System.config({
+ paths: {
+ // paths serve as alias
+ 'npm:': 'node_modules/'
+ },
+ // map tells the System loader where to look for things
+ map: {
+ // our app is within the app folder
+ app: 'app',
+ // angular bundles
+ '@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: {
+ app: {
+ main: './main.js',
+ defaultExtension: 'js'
+ },
+ rxjs: {
+ defaultExtension: 'js'
+ },
+ 'angular2-in-memory-web-api': {
+ main: './index.js',
+ defaultExtension: 'js'
+ }
+ }
+ });
})(this);
\ No newline at end of file
diff --git a/typings.json b/typings.json
index 192935f..7da31ca 100644
--- a/typings.json
+++ b/typings.json
@@ -1,7 +1,7 @@
{
"globalDependencies": {
- "core-js": "registry:dt/core-js#0.0.0+20160317120654",
- "jasmine": "registry:dt/jasmine#2.2.0+20160505161446",
- "node": "registry:dt/node#4.0.0+20160509154515"
+ "core-js": "registry:dt/core-js#0.0.0+20160725163759",
+ "jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
+ "node": "registry:dt/node#6.0.0+20160909174046"
}
-}
\ No newline at end of file
+}