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

Commit 2142269

Browse files
committed
convert imports and metadate sections
1 parent ced8328 commit 2142269

File tree

9 files changed

+188
-201
lines changed

9 files changed

+188
-201
lines changed

public/docs/_examples/cb-ts-to-js/js-es6-decorators/app/hero-lifecycle.component.es6

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import { BrowserModule } from '@angular/platform-browser';
1010
template: `<h1>Hero: {{name}}</h1>`
1111
})
1212
// #docregion
13-
class HeroComponent
14-
implements OnInit {
13+
class HeroComponent{
1514
name;
1615
ngOnInit() {
1716
this.name = 'Windstorm';

public/docs/_examples/cb-ts-to-js/js-es6/app/hero-lifecycle.component.es6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ class HeroComponent {
1111
this.name = 'Windstorm';
1212
}
1313
}
14+
// #enddocregion
1415

1516
HeroComponent.annotations = [
1617
new Component({
1718
selector: 'hero-lifecycle',
1819
template: `<h1>Hero: {{name}}</h1>`
1920
})
2021
];
21-
// #enddocregion
2222

2323
export class HeroesLifecycleModule { }
2424

public/docs/_examples/cb-ts-to-js/js-es6/app/hero.component.es6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
// #docregion metadata
33
import { Component } from '@angular/core';
44

5-
// #docregion appexport
65
// #docregion class
6+
// #docregion appexport
77
export class HeroComponent {
88
construct() {
99
this.title = 'Hero Detail';
1010
}
1111
getName() {return 'Windstorm'; }
1212
}
13+
// #enddocregion appexport
14+
// #enddocregion class
1315

1416
HeroComponent.annotations = [
1517
new Component({
1618
selector: 'hero-view',
1719
template: '<h1>Hero: {{getName()}}</h1>'
1820
})
1921
];
20-
// #enddocregion class
21-
// #enddocregion appexport
2222
// #enddocregion metadata
2323

2424
import { NgModule } from '@angular/core';

public/docs/_examples/cb-ts-to-js/js/app/hero-dsl.component.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
// #docregion component
66
var HeroComponent = ng.core.Component({
77
selector: 'hero-view-2',
8-
template:
9-
'<h1>Name: {{getName()}}</h1>',
8+
template: '<h1>Name: {{getName()}}</h1>',
109
})
1110
.Class({
1211
constructor: function() {

public/docs/_examples/cb-ts-to-js/js/app/hero-lifecycle.component.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
})
1111
];
1212
// #docregion
13-
HeroComponent.prototype.ngOnInit =
14-
function() {
15-
this.name = 'Windstorm';
16-
};
13+
HeroComponent.prototype.ngOnInit = function() {
14+
this.name = 'Windstorm';
15+
};
1716
// #enddocregion
1817

1918
app.HeroesLifecycleModule =

public/docs/_examples/cb-ts-to-js/js/app/hero.component.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
HeroComponent.annotations = [
1616
new ng.core.Component({
1717
selector: 'hero-view',
18-
template:
19-
'<h1>Hero: {{getName()}}</h1>'
18+
template: '<h1>Hero: {{getName()}}</h1>'
2019
})
2120
];
2221
// #docregion constructorproto
23-
HeroComponent.prototype.getName =
24-
function() {return 'Windstorm';};
22+
23+
HeroComponent.prototype.getName = function() {return 'Windstorm';};
2524
// #enddocregion constructorproto
2625
// #enddocregion metadata
2726

public/docs/_examples/cb-ts-to-js/js/app/main.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@
44
// #enddocregion appimport
55

66
// #docregion ng2import
7-
var platformBrowserDynamic =
8-
ng.platformBrowserDynamic.platformBrowserDynamic;
9-
var LocationStrategy =
10-
ng.common.LocationStrategy;
11-
var HashLocationStrategy =
12-
ng.common.HashLocationStrategy;
7+
var platformBrowserDynamic = ng.platformBrowserDynamic.platformBrowserDynamic;
8+
var LocationStrategy = ng.common.LocationStrategy;
9+
var HashLocationStrategy = ng.common.HashLocationStrategy;
1310
// #enddocregion ng2import
1411

1512
// #docregion appimport

public/docs/_examples/cb-ts-to-js/ts/app/hero-lifecycle.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import { BrowserModule } from '@angular/platform-browser';
1010
template: `<h1>Hero: {{name}}</h1>`
1111
})
1212
// #docregion
13-
class HeroComponent
14-
implements OnInit {
13+
class HeroComponent implements OnInit {
1514
name: string;
1615
ngOnInit() {
1716
this.name = 'Windstorm';

0 commit comments

Comments
 (0)