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

Commit 2b7fb86

Browse files
johnpapawardbell
authored andcommitted
docs(style-guide): remove rc relics and update for ngmodules (#2463)
1 parent 62d16a8 commit 2b7fb86

File tree

116 files changed

+1355
-662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+1355
-662
lines changed

public/docs/_examples/style-guide/e2e-spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,6 @@ describe('Style Guide', function () {
7777
expect(div.getText()).toBe('This is heroes component');
7878
});
7979

80-
it('04-14', function () {
81-
browser.get('#/04-14');
82-
83-
let h2 = element(by.tagName('sg-app > toh-heroes > div > h2'));
84-
expect(h2.getText()).toBe('My Heroes');
85-
});
86-
8780
it('05-02', function () {
8881
browser.get('#/05-02');
8982

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// #docregion
2+
import { Component } from '@angular/core';
3+
4+
@Component({
5+
moduleId: module.id,
6+
selector: 'toh-app',
7+
template: `
8+
Tour of Heroes
9+
`
10+
})
11+
export class AppComponent { }
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1+
// #docplaster
2+
// #docregion
13
import { NgModule } from '@angular/core';
24
import { BrowserModule } from '@angular/platform-browser';
35
import { RouterModule } from '@angular/router';
46

57
import { AppComponent } from './app.component';
6-
import { HeroesComponent } from './heroes';
78

89
@NgModule({
910
imports: [
1011
BrowserModule,
11-
RouterModule.forChild([{ path: '04-14', component: AppComponent }])
12+
// #enddocregion
13+
RouterModule.forChild([{ path: '02-05', component: AppComponent }])
14+
// #docregion
1215
],
1316
declarations: [
14-
AppComponent,
15-
HeroesComponent
17+
AppComponent
1618
],
17-
exports: [ AppComponent ]
19+
exports: [ AppComponent ],
20+
bootstrap: [ AppComponent ]
1821
})
19-
export class AppModule {}
22+
export class AppModule { }
23+
// #enddocregion
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// #docregion
2+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3+
4+
import { AppModule } from './app/app.module';
5+
6+
platformBrowserDynamic().bootstrapModule(AppModule)
7+
.then(success => console.log(`Bootstrap success`))
8+
.catch(err => console.error(err));

public/docs/_examples/style-guide/ts/02-08/app/app.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ import { NgModule } from '@angular/core';
22
import { RouterModule } from '@angular/router';
33

44
import { AppComponent } from './app.component';
5-
import { ValidateDirective } from './shared';
5+
import { InputHighlightDirective,
6+
ValidateDirective } from './shared';
67

78
@NgModule({
89
imports: [
910
RouterModule.forChild([{ path: '02-08', component: AppComponent }])
1011
],
1112
declarations: [
1213
AppComponent,
14+
InputHighlightDirective,
1315
ValidateDirective
1416
],
1517
exports: [ AppComponent ]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
export * from './input-highlight.directive';
12
export * from './validate.directive';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// #docregion
2+
import { Directive, ElementRef, Renderer } from '@angular/core';
3+
4+
@Directive({ selector: 'input'})
5+
/** Highlight the attached input text element in blue */
6+
export class InputHighlightDirective {
7+
constructor(renderer: Renderer, el: ElementRef) {
8+
renderer.setElementStyle(el.nativeElement, 'backgroundColor', 'powderblue');
9+
}
10+
}

public/docs/_examples/style-guide/ts/03-01/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, OnInit } from '@angular/core';
22

3-
import { ExceptionService } from './shared';
3+
import { ExceptionService } from './core';
44

55
@Component({
66
selector: 'sg-app',

0 commit comments

Comments
 (0)