Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit efcb906

Browse files
authored
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
1 parent 56e6513 commit efcb906

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

public/docs/_examples/_boilerplate/systemjs.config.web.build.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
// other libraries
6363
'rxjs': 'npm:rxjs',
6464
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
65-
'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js',
66-
'typescript': 'npm:[email protected].3/lib/typescript.js',
65+
'ts': 'npm:plugin-typescript@5.2.7/lib/plugin.js',
66+
'typescript': 'npm:[email protected].10/lib/typescript.js',
6767

6868
},
6969
// packages tells the System loader how to load when no filename and/or no extension

public/docs/_examples/_boilerplate/systemjs.config.web.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
// other libraries
5050
'rxjs': 'npm:rxjs',
5151
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
52-
'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js',
53-
'typescript': 'npm:[email protected].3/lib/typescript.js',
52+
'ts': 'npm:plugin-typescript@5.2.7/lib/plugin.js',
53+
'typescript': 'npm:[email protected].10/lib/typescript.js',
5454

5555
},
5656
// packages tells the System loader how to load when no filename and/or no extension

public/docs/_examples/cb-component-communication/ts/app/name-child.component.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@ import { Component, Input } from '@angular/core';
33

44
@Component({
55
selector: 'name-child',
6-
template: `
7-
<h3>"{{name}}"</h3>
8-
`
6+
template: '<h3>"{{name}}"</h3>'
97
})
108
export class NameChildComponent {
11-
_name: string = '<no name set>';
9+
private _name = '';
1210

1311
@Input()
1412
set name(name: string) {
1513
this._name = (name && name.trim()) || '<no name set>';
1614
}
1715

18-
get name() { return this._name; }
16+
get name(): string { return this._name; }
1917
}
2018
// #enddocregion

public/docs/_examples/cb-component-communication/ts/app/name-parent.component.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ import { Component } from '@angular/core';
44
@Component({
55
selector: 'name-parent',
66
template: `
7-
<h2>Master controls {{names.length}} names</h2>
8-
<name-child *ngFor="let name of names"
9-
[name]="name">
10-
</name-child>
7+
<h2>Master controls {{names.length}} names</h2>
8+
<name-child *ngFor="let name of names" [name]="name"></name-child>
119
`
1210
})
1311
export class NameParentComponent {

public/docs/_examples/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"style-loader": "^0.13.1",
8282
"ts-node": "^1.3.0",
8383
"tslint": "^3.15.1",
84-
"typescript": "^2.0.3",
84+
"typescript": "^2.0.10",
8585
"webdriver-manager": "10.2.5",
8686
"webpack": "^1.13.0",
8787
"webpack-dev-server": "^1.14.1",

0 commit comments

Comments
 (0)