From 2fea2a6252e2bf6e74bc216f040c904606308143 Mon Sep 17 00:00:00 2001 From: Adrien TORRIS Date: Thu, 9 Mar 2017 14:18:28 +0100 Subject: [PATCH 1/3] Typescript fatal error fixed Fix the error reported in this issue : https://github.com/angular/angular-electron/issues/20 --- package.json | 2 +- tsconfig.json | 2 +- typings.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b753a40..d4cac4d 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "setup": "npm install --no-optional && npm run typings-install", "setup-demo": "npm install --no-optional angular2@2.0.0-beta.12 es6-promise@^3.1.2 es6-shim@0.35.0 reflect-metadata@0.1.2 rxjs@5.0.0-beta.2 zone.js@^0.6.6", "build": "npm run clean && tsc", - "build_demo": "tsc typings/browser.d.ts demo/main.ts demo/app_ui.ts --module commonjs -t es5 --experimentalDecorators --emitDecoratorMetadata", + "build_demo": "tsc typings/index.d.ts demo/main.ts demo/app_ui.ts --module commonjs -t es5 --experimentalDecorators --emitDecoratorMetadata", "test": "echo Not supported yet", "demo": "npm run build && npm run build_demo && electron ./demo", "start": "npm run demo" diff --git a/tsconfig.json b/tsconfig.json index 62e4495..1f405f2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ "moduleResolution": "node" }, "files": [ - "typings/browser.d.ts", + "typings/index.d.ts", "./src/renderer.ts", "./src/main.ts" ] diff --git a/typings.json b/typings.json index 3594715..4cbf88f 100644 --- a/typings.json +++ b/typings.json @@ -1,7 +1,7 @@ { "name": "@angular2/electron", "devDependencies": {}, - "ambientDependencies": { + "globalDependencies": { "es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#6697d6f7dadbf5773cb40ecda35a76027e0783b2", "github-electron": "github:DefinitelyTyped/DefinitelyTyped/github-electron/github-electron.d.ts#f16c4922a7dd6d359a197e4cc5103463ba68cf9e", "node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#138ad74b9e8e6c08af7633964962835add4c91e2" From c0b8e3d486e1973cb5405bf6a03881d01db8f8b1 Mon Sep 17 00:00:00 2001 From: nayunhwan Date: Thu, 23 Mar 2017 21:35:45 +0900 Subject: [PATCH 2/3] Fix Bugs #13 #20 --- .gitignore | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a7d5858..5ef8b48 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ dist/ typings/ npm-debug.log .DS_Store +.idea demo/*.js diff --git a/package.json b/package.json index d4cac4d..f60852f 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "clean": "rimraf dist", "typings-install": "typings install", "setup": "npm install --no-optional && npm run typings-install", - "setup-demo": "npm install --no-optional angular2@2.0.0-beta.12 es6-promise@^3.1.2 es6-shim@0.35.0 reflect-metadata@0.1.2 rxjs@5.0.0-beta.2 zone.js@^0.6.6", + "setup-demo": "npm install --no-optional angular2@2.0.0-beta.12 es6-promise@^3.1.2 es6-shim@0.35.0 reflect-metadata@0.1.2 rxjs@5.0.0-beta.2 zone.js@0.6.6", "build": "npm run clean && tsc", "build_demo": "tsc typings/index.d.ts demo/main.ts demo/app_ui.ts --module commonjs -t es5 --experimentalDecorators --emitDecoratorMetadata", "test": "echo Not supported yet", From 7ca558140b2522d298a608d952c95dc9f53684e6 Mon Sep 17 00:00:00 2001 From: nayunhwan Date: Sun, 9 Apr 2017 14:50:16 +0900 Subject: [PATCH 3/3] Update' --- demo/component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/demo/component.ts b/demo/component.ts index 9b921d0..17e68a6 100644 --- a/demo/component.ts +++ b/demo/component.ts @@ -2,13 +2,16 @@ import {Component} from 'angular2/core'; @Component({ selector: 'app', - template: `
Hello from {{name}}
` + template: `
Hello from {{name}} {{id}}
` }) + export class App { name: string; + id: string; + constructor(){ this.name = 'Angular2 Electron!'; - + this.id = "Good to see you"; setTimeout(() => { this.name = 'Angular2 Electron!!!'; },1000);