From 9262f7a2343cb2a19665abbffdb1490fc77bc14e Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Thu, 15 Sep 2016 16:15:55 -0700 Subject: [PATCH] docs(ngmodule): remove hero.service from module (post-RC6 todo) also switched to moduleId --- .../ngmodule/ts/app/contact/contact.component.3.ts | 7 ++++--- .../_examples/ngmodule/ts/app/contact/contact.component.ts | 7 ++++--- .../docs/_examples/ngmodule/ts/app/core/title.component.ts | 3 ++- .../docs/_examples/ngmodule/ts/app/hero/hero.module.3.ts | 5 ----- public/docs/_examples/ngmodule/ts/app/hero/hero.module.ts | 5 ----- public/docs/_examples/ngmodule/ts/app/title.component.ts | 3 ++- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/public/docs/_examples/ngmodule/ts/app/contact/contact.component.3.ts b/public/docs/_examples/ngmodule/ts/app/contact/contact.component.3.ts index 019e477e63..392904086a 100644 --- a/public/docs/_examples/ngmodule/ts/app/contact/contact.component.3.ts +++ b/public/docs/_examples/ngmodule/ts/app/contact/contact.component.3.ts @@ -5,9 +5,10 @@ import { Contact, ContactService } from './contact.service'; import { UserService } from '../user.service'; @Component({ + moduleId: module.id, selector: 'app-contact', - templateUrl: 'app/contact/contact.component.html', - styleUrls: ['app/contact/contact.component.css'] + templateUrl: 'contact.component.html', + styleUrls: ['contact.component.css'] }) export class ContactComponent implements OnInit { contact: Contact; @@ -35,7 +36,7 @@ export class ContactComponent implements OnInit { } onSubmit() { - // TODO: do something like save it + // POST-DEMO TODO: do something like save it this.displayMessage('Saved ' + this.contact.name); } diff --git a/public/docs/_examples/ngmodule/ts/app/contact/contact.component.ts b/public/docs/_examples/ngmodule/ts/app/contact/contact.component.ts index 2a60cda1f3..bb6f2e3b42 100644 --- a/public/docs/_examples/ngmodule/ts/app/contact/contact.component.ts +++ b/public/docs/_examples/ngmodule/ts/app/contact/contact.component.ts @@ -6,9 +6,10 @@ import { Contact, ContactService } from './contact.service'; import { UserService } from '../core/user.service'; @Component({ + moduleId: module.id, selector: 'app-contact', - templateUrl: 'app/contact/contact.component.html', - styleUrls: ['app/contact/contact.component.css'] + templateUrl: 'contact.component.html', + styleUrls: ['contact.component.css'] }) export class ContactComponent implements OnInit { contact: Contact; @@ -36,7 +37,7 @@ export class ContactComponent implements OnInit { } onSubmit() { - // TODO: do something like save it + // POST-DEMO TODO: do something like save it this.displayMessage('Saved ' + this.contact.name); } diff --git a/public/docs/_examples/ngmodule/ts/app/core/title.component.ts b/public/docs/_examples/ngmodule/ts/app/core/title.component.ts index ca8cffe9d5..be2df3acf1 100644 --- a/public/docs/_examples/ngmodule/ts/app/core/title.component.ts +++ b/public/docs/_examples/ngmodule/ts/app/core/title.component.ts @@ -3,8 +3,9 @@ import { Component, Input } from '@angular/core'; import { UserService } from '../core/user.service'; @Component({ + moduleId: module.id, selector: 'app-title', - templateUrl: 'app/core/title.component.html', + templateUrl: 'title.component.html', }) export class TitleComponent { @Input() subtitle = ''; diff --git a/public/docs/_examples/ngmodule/ts/app/hero/hero.module.3.ts b/public/docs/_examples/ngmodule/ts/app/hero/hero.module.3.ts index 95f58730f5..319af623bb 100644 --- a/public/docs/_examples/ngmodule/ts/app/hero/hero.module.3.ts +++ b/public/docs/_examples/ngmodule/ts/app/hero/hero.module.3.ts @@ -8,14 +8,9 @@ import { HeroListComponent } from './hero-list.component'; import { HighlightDirective } from './highlight.directive'; import { routing } from './hero.routing.3'; -// TODO: Remove in RC 6 -import { HeroService } from './hero.service'; - // #docregion class @NgModule({ imports: [ CommonModule, FormsModule, routing ], - // TODO: Remove in RC 6 - providers: [ HeroService ], declarations: [ HeroComponent, HeroDetailComponent, HeroListComponent, HighlightDirective diff --git a/public/docs/_examples/ngmodule/ts/app/hero/hero.module.ts b/public/docs/_examples/ngmodule/ts/app/hero/hero.module.ts index c3f7d73270..57159ed533 100644 --- a/public/docs/_examples/ngmodule/ts/app/hero/hero.module.ts +++ b/public/docs/_examples/ngmodule/ts/app/hero/hero.module.ts @@ -7,13 +7,8 @@ import { HeroDetailComponent } from './hero-detail.component'; import { HeroListComponent } from './hero-list.component'; import { routing } from './hero.routing'; -// TODO: Remove THE HeroService class in RC 6 -import { HeroService } from './hero.service'; - @NgModule({ imports: [ SharedModule, routing ], - // TODO: Remove in RC 6 - providers: [ HeroService ], declarations: [ HeroComponent, HeroDetailComponent, HeroListComponent, ] diff --git a/public/docs/_examples/ngmodule/ts/app/title.component.ts b/public/docs/_examples/ngmodule/ts/app/title.component.ts index 0edfd4b468..cd5a19aad0 100644 --- a/public/docs/_examples/ngmodule/ts/app/title.component.ts +++ b/public/docs/_examples/ngmodule/ts/app/title.component.ts @@ -7,8 +7,9 @@ import { UserService } from './user.service'; // #docregion v1 @Component({ + moduleId: module.id, selector: 'app-title', - templateUrl: 'app/title.component.html', + templateUrl: 'title.component.html', }) export class TitleComponent { @Input() subtitle = '';