docs(ngmodule): remove hero.service from module (post-RC6 todo)
also switched to moduleId
This commit is contained in:
parent
f0ff5e26bd
commit
9262f7a234
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
]
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
Loading…
Reference in New Issue