From efcb906981e41a2a7c59d5e273f177fec82c64a7 Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Tue, 29 Nov 2016 15:39:53 -0800 Subject: [PATCH] chore(cb-component-communication): tweak code/update TS version (#2900) Simplify name-child component. Update TS version in package.json and the web systemjs.configs Inspired by issue #2881 --- .../_examples/_boilerplate/systemjs.config.web.build.js | 4 ++-- public/docs/_examples/_boilerplate/systemjs.config.web.js | 4 ++-- .../ts/app/name-child.component.ts | 8 +++----- .../ts/app/name-parent.component.ts | 6 ++---- public/docs/_examples/package.json | 2 +- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/public/docs/_examples/_boilerplate/systemjs.config.web.build.js b/public/docs/_examples/_boilerplate/systemjs.config.web.build.js index b340fc6159..7fae70c343 100644 --- a/public/docs/_examples/_boilerplate/systemjs.config.web.build.js +++ b/public/docs/_examples/_boilerplate/systemjs.config.web.build.js @@ -62,8 +62,8 @@ // other libraries 'rxjs': 'npm:rxjs', 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js', - 'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js', - 'typescript': 'npm:typescript@2.0.3/lib/typescript.js', + 'ts': 'npm:plugin-typescript@5.2.7/lib/plugin.js', + 'typescript': 'npm:typescript@2.0.10/lib/typescript.js', }, // packages tells the System loader how to load when no filename and/or no extension diff --git a/public/docs/_examples/_boilerplate/systemjs.config.web.js b/public/docs/_examples/_boilerplate/systemjs.config.web.js index 768d357ed7..ea17c45d57 100644 --- a/public/docs/_examples/_boilerplate/systemjs.config.web.js +++ b/public/docs/_examples/_boilerplate/systemjs.config.web.js @@ -49,8 +49,8 @@ // other libraries 'rxjs': 'npm:rxjs', 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js', - 'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js', - 'typescript': 'npm:typescript@2.0.3/lib/typescript.js', + 'ts': 'npm:plugin-typescript@5.2.7/lib/plugin.js', + 'typescript': 'npm:typescript@2.0.10/lib/typescript.js', }, // packages tells the System loader how to load when no filename and/or no extension diff --git a/public/docs/_examples/cb-component-communication/ts/app/name-child.component.ts b/public/docs/_examples/cb-component-communication/ts/app/name-child.component.ts index 8e826075b0..bc6d3c6f59 100644 --- a/public/docs/_examples/cb-component-communication/ts/app/name-child.component.ts +++ b/public/docs/_examples/cb-component-communication/ts/app/name-child.component.ts @@ -3,18 +3,16 @@ import { Component, Input } from '@angular/core'; @Component({ selector: 'name-child', - template: ` -

"{{name}}"

- ` + template: '

"{{name}}"

' }) export class NameChildComponent { - _name: string = ''; + private _name = ''; @Input() set name(name: string) { this._name = (name && name.trim()) || ''; } - get name() { return this._name; } + get name(): string { return this._name; } } // #enddocregion diff --git a/public/docs/_examples/cb-component-communication/ts/app/name-parent.component.ts b/public/docs/_examples/cb-component-communication/ts/app/name-parent.component.ts index 699690c067..99753303aa 100644 --- a/public/docs/_examples/cb-component-communication/ts/app/name-parent.component.ts +++ b/public/docs/_examples/cb-component-communication/ts/app/name-parent.component.ts @@ -4,10 +4,8 @@ import { Component } from '@angular/core'; @Component({ selector: 'name-parent', template: ` -

Master controls {{names.length}} names

- - +

Master controls {{names.length}} names

+ ` }) export class NameParentComponent { diff --git a/public/docs/_examples/package.json b/public/docs/_examples/package.json index f6837721ef..61c804c77d 100644 --- a/public/docs/_examples/package.json +++ b/public/docs/_examples/package.json @@ -81,7 +81,7 @@ "style-loader": "^0.13.1", "ts-node": "^1.3.0", "tslint": "^3.15.1", - "typescript": "^2.0.3", + "typescript": "^2.0.10", "webdriver-manager": "10.2.5", "webpack": "^1.13.0", "webpack-dev-server": "^1.14.1",