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';
|
import { UserService } from '../user.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
moduleId: module.id,
|
||||||
selector: 'app-contact',
|
selector: 'app-contact',
|
||||||
templateUrl: 'app/contact/contact.component.html',
|
templateUrl: 'contact.component.html',
|
||||||
styleUrls: ['app/contact/contact.component.css']
|
styleUrls: ['contact.component.css']
|
||||||
})
|
})
|
||||||
export class ContactComponent implements OnInit {
|
export class ContactComponent implements OnInit {
|
||||||
contact: Contact;
|
contact: Contact;
|
||||||
|
@ -35,7 +36,7 @@ export class ContactComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
// TODO: do something like save it
|
// POST-DEMO TODO: do something like save it
|
||||||
this.displayMessage('Saved ' + this.contact.name);
|
this.displayMessage('Saved ' + this.contact.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,10 @@ import { Contact, ContactService } from './contact.service';
|
||||||
import { UserService } from '../core/user.service';
|
import { UserService } from '../core/user.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
moduleId: module.id,
|
||||||
selector: 'app-contact',
|
selector: 'app-contact',
|
||||||
templateUrl: 'app/contact/contact.component.html',
|
templateUrl: 'contact.component.html',
|
||||||
styleUrls: ['app/contact/contact.component.css']
|
styleUrls: ['contact.component.css']
|
||||||
})
|
})
|
||||||
export class ContactComponent implements OnInit {
|
export class ContactComponent implements OnInit {
|
||||||
contact: Contact;
|
contact: Contact;
|
||||||
|
@ -36,7 +37,7 @@ export class ContactComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
// TODO: do something like save it
|
// POST-DEMO TODO: do something like save it
|
||||||
this.displayMessage('Saved ' + this.contact.name);
|
this.displayMessage('Saved ' + this.contact.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,9 @@ import { Component, Input } from '@angular/core';
|
||||||
import { UserService } from '../core/user.service';
|
import { UserService } from '../core/user.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
moduleId: module.id,
|
||||||
selector: 'app-title',
|
selector: 'app-title',
|
||||||
templateUrl: 'app/core/title.component.html',
|
templateUrl: 'title.component.html',
|
||||||
})
|
})
|
||||||
export class TitleComponent {
|
export class TitleComponent {
|
||||||
@Input() subtitle = '';
|
@Input() subtitle = '';
|
||||||
|
|
|
@ -8,14 +8,9 @@ import { HeroListComponent } from './hero-list.component';
|
||||||
import { HighlightDirective } from './highlight.directive';
|
import { HighlightDirective } from './highlight.directive';
|
||||||
import { routing } from './hero.routing.3';
|
import { routing } from './hero.routing.3';
|
||||||
|
|
||||||
// TODO: Remove in RC 6
|
|
||||||
import { HeroService } from './hero.service';
|
|
||||||
|
|
||||||
// #docregion class
|
// #docregion class
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ CommonModule, FormsModule, routing ],
|
imports: [ CommonModule, FormsModule, routing ],
|
||||||
// TODO: Remove in RC 6
|
|
||||||
providers: [ HeroService ],
|
|
||||||
declarations: [
|
declarations: [
|
||||||
HeroComponent, HeroDetailComponent, HeroListComponent,
|
HeroComponent, HeroDetailComponent, HeroListComponent,
|
||||||
HighlightDirective
|
HighlightDirective
|
||||||
|
|
|
@ -7,13 +7,8 @@ import { HeroDetailComponent } from './hero-detail.component';
|
||||||
import { HeroListComponent } from './hero-list.component';
|
import { HeroListComponent } from './hero-list.component';
|
||||||
import { routing } from './hero.routing';
|
import { routing } from './hero.routing';
|
||||||
|
|
||||||
// TODO: Remove THE HeroService class in RC 6
|
|
||||||
import { HeroService } from './hero.service';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ SharedModule, routing ],
|
imports: [ SharedModule, routing ],
|
||||||
// TODO: Remove in RC 6
|
|
||||||
providers: [ HeroService ],
|
|
||||||
declarations: [
|
declarations: [
|
||||||
HeroComponent, HeroDetailComponent, HeroListComponent,
|
HeroComponent, HeroDetailComponent, HeroListComponent,
|
||||||
]
|
]
|
||||||
|
|
|
@ -7,8 +7,9 @@ import { UserService } from './user.service';
|
||||||
// #docregion v1
|
// #docregion v1
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
moduleId: module.id,
|
||||||
selector: 'app-title',
|
selector: 'app-title',
|
||||||
templateUrl: 'app/title.component.html',
|
templateUrl: 'title.component.html',
|
||||||
})
|
})
|
||||||
export class TitleComponent {
|
export class TitleComponent {
|
||||||
@Input() subtitle = '';
|
@Input() subtitle = '';
|
||||||
|
|
Loading…
Reference in New Issue