chore: convert relative templateUrl/styleUrls to have ./
This commit is contained in:
parent
2f28b321ee
commit
4ec1736f18
|
@ -23,7 +23,7 @@ import { Heroes } from './hero.service';
|
||||||
</ul>
|
</ul>
|
||||||
`,
|
`,
|
||||||
// #enddocregion template
|
// #enddocregion template
|
||||||
styleUrls: ['hero-list.component.css'],
|
styleUrls: ['./hero-list.component.css'],
|
||||||
|
|
||||||
/* When the element leaves (transition "in => void" occurs),
|
/* When the element leaves (transition "in => void" occurs),
|
||||||
* get the element's current computed height and animate
|
* get the element's current computed height and animate
|
||||||
|
|
|
@ -34,7 +34,7 @@ import { Heroes } from './hero.service';
|
||||||
</ul>
|
</ul>
|
||||||
`,
|
`,
|
||||||
// #enddocregion template
|
// #enddocregion template
|
||||||
styleUrls: ['hero-list.component.css'],
|
styleUrls: ['./hero-list.component.css'],
|
||||||
// #enddocregion
|
// #enddocregion
|
||||||
/**
|
/**
|
||||||
* Define two states, "inactive" and "active", and the end
|
* Define two states, "inactive" and "active", and the end
|
||||||
|
|
|
@ -27,7 +27,7 @@ import { Heroes } from './hero.service';
|
||||||
</ul>
|
</ul>
|
||||||
`,
|
`,
|
||||||
// #enddocregion template
|
// #enddocregion template
|
||||||
styleUrls: ['hero-list.component.css'],
|
styleUrls: ['./hero-list.component.css'],
|
||||||
/*
|
/*
|
||||||
* Define two states, "inactive" and "active", and the end
|
* Define two states, "inactive" and "active", and the end
|
||||||
* styles that apply whenever the element is in those states.
|
* styles that apply whenever the element is in those states.
|
||||||
|
|
|
@ -24,7 +24,7 @@ import { Heroes } from './hero.service';
|
||||||
</ul>
|
</ul>
|
||||||
`,
|
`,
|
||||||
// #enddocregion template
|
// #enddocregion template
|
||||||
styleUrls: ['hero-list.component.css'],
|
styleUrls: ['./hero-list.component.css'],
|
||||||
/* The elements here have two possible states based
|
/* The elements here have two possible states based
|
||||||
* on the hero state, "active", or "inactive". We animate
|
* on the hero state, "active", or "inactive". We animate
|
||||||
* six transitions: Between the two states in both directions,
|
* six transitions: Between the two states in both directions,
|
||||||
|
|
|
@ -23,7 +23,7 @@ import { Heroes } from './hero.service';
|
||||||
</ul>
|
</ul>
|
||||||
`,
|
`,
|
||||||
// #enddocregion template
|
// #enddocregion template
|
||||||
styleUrls: ['hero-list.component.css'],
|
styleUrls: ['./hero-list.component.css'],
|
||||||
/* The element here always has the state "in" when it
|
/* The element here always has the state "in" when it
|
||||||
* is present. We animate two transitions: From void
|
* is present. We animate two transitions: From void
|
||||||
* to in and from in to void, to achieve an animated
|
* to in and from in to void, to achieve an animated
|
||||||
|
|
|
@ -22,7 +22,7 @@ import { Heroes } from './hero.service';
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
`,
|
`,
|
||||||
styleUrls: ['hero-list.component.css'],
|
styleUrls: ['./hero-list.component.css'],
|
||||||
styles: [`
|
styles: [`
|
||||||
li {
|
li {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
|
|
@ -26,7 +26,7 @@ import { Heroes } from './hero.service';
|
||||||
</ul>
|
</ul>
|
||||||
`,
|
`,
|
||||||
// #enddocregion template
|
// #enddocregion template
|
||||||
styleUrls: ['hero-list.component.css'],
|
styleUrls: ['./hero-list.component.css'],
|
||||||
/**
|
/**
|
||||||
* Define two states, "inactive" and "active", and the end
|
* Define two states, "inactive" and "active", and the end
|
||||||
* styles that apply whenever the element is in those states.
|
* styles that apply whenever the element is in those states.
|
||||||
|
|
|
@ -27,7 +27,7 @@ import { Heroes } from './hero.service';
|
||||||
</ul>
|
</ul>
|
||||||
`,
|
`,
|
||||||
// #enddocregion template
|
// #enddocregion template
|
||||||
styleUrls: ['hero-list.component.css'],
|
styleUrls: ['./hero-list.component.css'],
|
||||||
/* The element here always has the state "in" when it
|
/* The element here always has the state "in" when it
|
||||||
* is present. We animate two transitions: From void
|
* is present. We animate two transitions: From void
|
||||||
* to in and from in to void, to achieve an animated
|
* to in and from in to void, to achieve an animated
|
||||||
|
|
|
@ -22,7 +22,7 @@ import { Heroes } from './hero.service';
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
`,
|
`,
|
||||||
styleUrls: ['hero-list.component.css'],
|
styleUrls: ['./hero-list.component.css'],
|
||||||
/* The element here always has the state "in" when it
|
/* The element here always has the state "in" when it
|
||||||
* is present. We animate two transitions: From void
|
* is present. We animate two transitions: From void
|
||||||
* to in and from in to void, to achieve an animated
|
* to in and from in to void, to achieve an animated
|
||||||
|
|
|
@ -27,7 +27,7 @@ import { Heroes } from './hero.service';
|
||||||
</ul>
|
</ul>
|
||||||
`,
|
`,
|
||||||
// #enddocregion template
|
// #enddocregion template
|
||||||
styleUrls: ['hero-list.component.css'],
|
styleUrls: ['./hero-list.component.css'],
|
||||||
/*
|
/*
|
||||||
* Define two states, "inactive" and "active", and the end
|
* Define two states, "inactive" and "active", and the end
|
||||||
* styles that apply whenever the element is in those states.
|
* styles that apply whenever the element is in those states.
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { Hero } from './hero';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'hero-detail',
|
selector: 'hero-detail',
|
||||||
templateUrl: 'hero-detail.component.html'
|
templateUrl: './hero-detail.component.html'
|
||||||
})
|
})
|
||||||
export class HeroDetailComponent {
|
export class HeroDetailComponent {
|
||||||
@Input() hero: Hero;
|
@Input() hero: Hero;
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { HeroService } from './hero.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'hero-list',
|
selector: 'hero-list',
|
||||||
templateUrl: 'hero-list.component.html',
|
templateUrl: './hero-list.component.html',
|
||||||
providers: [ HeroService ]
|
providers: [ HeroService ]
|
||||||
})
|
})
|
||||||
// #enddocregion providers
|
// #enddocregion providers
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.1.html'
|
templateUrl: './app.component.1.html'
|
||||||
})
|
})
|
||||||
// #docregion class
|
// #docregion class
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
// #docregion class
|
// #docregion class
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import { IMovie } from './movie';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styleUrls: [ 'app.component.css' ],
|
styleUrls: [ './app.component.css' ],
|
||||||
providers: [ MovieService ]
|
providers: [ MovieService ]
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
|
|
@ -10,10 +10,10 @@ import { MovieService } from './movie.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'movie-list',
|
selector: 'movie-list',
|
||||||
templateUrl: 'movie-list.component.html',
|
templateUrl: './movie-list.component.html',
|
||||||
// #enddocregion component
|
// #enddocregion component
|
||||||
// #docregion style-url
|
// #docregion style-url
|
||||||
styleUrls: [ 'movie-list.component.css' ],
|
styleUrls: [ './movie-list.component.css' ],
|
||||||
// #enddocregion style-url
|
// #enddocregion style-url
|
||||||
})
|
})
|
||||||
// #enddocregion component
|
// #enddocregion component
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
showHeading = true;
|
showHeading = true;
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent { }
|
export class AppComponent { }
|
||||||
|
|
|
@ -24,8 +24,8 @@ export class SomeAbsoluteComponent {
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
// #enddocregion module-id
|
// #enddocregion module-id
|
||||||
selector: 'relative-path',
|
selector: 'relative-path',
|
||||||
templateUrl: 'some.component.html',
|
templateUrl: './some.component.html',
|
||||||
styleUrls: ['some.component.css']
|
styleUrls: ['./some.component.css']
|
||||||
})
|
})
|
||||||
// #enddocregion relative-config
|
// #enddocregion relative-config
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { UserService } from './user.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html',
|
templateUrl: './app.component.html',
|
||||||
// #docregion providers
|
// #docregion providers
|
||||||
providers: [ LoggerService, UserContextService, UserService ]
|
providers: [ LoggerService, UserContextService, UserService ]
|
||||||
// #enddocregion providers
|
// #enddocregion providers
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { QuestionBase } from './question-base';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'df-question',
|
selector: 'df-question',
|
||||||
templateUrl: 'dynamic-form-question.component.html'
|
templateUrl: './dynamic-form-question.component.html'
|
||||||
})
|
})
|
||||||
export class DynamicFormQuestionComponent {
|
export class DynamicFormQuestionComponent {
|
||||||
@Input() question: QuestionBase<any>;
|
@Input() question: QuestionBase<any>;
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { QuestionControlService } from './question-control.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'dynamic-form',
|
selector: 'dynamic-form',
|
||||||
templateUrl: 'dynamic-form.component.html',
|
templateUrl: './dynamic-form.component.html',
|
||||||
providers: [ QuestionControlService ]
|
providers: [ QuestionControlService ]
|
||||||
})
|
})
|
||||||
export class DynamicFormComponent implements OnInit {
|
export class DynamicFormComponent implements OnInit {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { forbiddenNameValidator } from '../shared/forbidden-name.directive';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'hero-form-reactive3',
|
selector: 'hero-form-reactive3',
|
||||||
templateUrl: 'hero-form-reactive.component.html'
|
templateUrl: './hero-form-reactive.component.html'
|
||||||
})
|
})
|
||||||
export class HeroFormReactiveComponent implements OnInit {
|
export class HeroFormReactiveComponent implements OnInit {
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { Hero } from '../shared/hero';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'hero-form-template1',
|
selector: 'hero-form-template1',
|
||||||
templateUrl: 'hero-form-template1.component.html'
|
templateUrl: './hero-form-template1.component.html'
|
||||||
})
|
})
|
||||||
// #docregion class
|
// #docregion class
|
||||||
export class HeroFormTemplate1Component {
|
export class HeroFormTemplate1Component {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { Hero } from '../shared/hero';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'hero-form-template2',
|
selector: 'hero-form-template2',
|
||||||
templateUrl: 'hero-form-template2.component.html'
|
templateUrl: './hero-form-template2.component.html'
|
||||||
})
|
})
|
||||||
export class HeroFormTemplate2Component implements AfterViewChecked {
|
export class HeroFormTemplate2Component implements AfterViewChecked {
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
wolves = 0;
|
wolves = 0;
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styles: [
|
styles: [
|
||||||
// See hero-di-inject-additional.component
|
// See hero-di-inject-additional.component
|
||||||
'hero-host, hero-host-meta { border: 1px dashed black; display: block; padding: 4px;}',
|
'hero-host, hero-host-meta { border: 1px dashed black; display: block; padding: 4px;}',
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'app-confirm',
|
selector: 'app-confirm',
|
||||||
templateUrl: 'confirm.component.html'
|
templateUrl: './confirm.component.html'
|
||||||
})
|
})
|
||||||
export class ConfirmComponent {
|
export class ConfirmComponent {
|
||||||
@Input() okMsg = '';
|
@Input() okMsg = '';
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { Attribute, Component, Inject, Optional } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'hero-title',
|
selector: 'hero-title',
|
||||||
templateUrl: 'hero-title.component.html'
|
templateUrl: './hero-title.component.html'
|
||||||
})
|
})
|
||||||
// #enddocregion templateUrl
|
// #enddocregion templateUrl
|
||||||
export class HeroTitleComponent {
|
export class HeroTitleComponent {
|
||||||
|
|
|
@ -10,7 +10,7 @@ AppComponent.annotations = [
|
||||||
new Component({
|
new Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styles: [
|
styles: [
|
||||||
// See hero-di-inject-additional.component
|
// See hero-di-inject-additional.component
|
||||||
'hero-host { border: 1px dashed black; display: block; padding: 4px;}',
|
'hero-host { border: 1px dashed black; display: block; padding: 4px;}',
|
||||||
|
|
|
@ -18,7 +18,7 @@ ConfirmComponent.annotations = [
|
||||||
new Component({
|
new Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'app-confirm',
|
selector: 'app-confirm',
|
||||||
templateUrl: 'confirm.component.html',
|
templateUrl: './confirm.component.html',
|
||||||
inputs: [
|
inputs: [
|
||||||
'okMsg',
|
'okMsg',
|
||||||
'notOkMsg: cancelMsg'
|
'notOkMsg: cancelMsg'
|
||||||
|
|
|
@ -18,7 +18,7 @@ HeroTitleComponent.annotations = [
|
||||||
new Component({
|
new Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'hero-title',
|
selector: 'hero-title',
|
||||||
templateUrl: 'hero-title.component.html'
|
templateUrl: './hero-title.component.html'
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
// #enddocregion templateUrl
|
// #enddocregion templateUrl
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styles: [
|
styles: [
|
||||||
// See hero-di-inject-additional.component
|
// See hero-di-inject-additional.component
|
||||||
'hero-host, hero-host-meta { border: 1px dashed black; display: block; padding: 4px;}',
|
'hero-host, hero-host-meta { border: 1px dashed black; display: block; padding: 4px;}',
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'app-confirm',
|
selector: 'app-confirm',
|
||||||
templateUrl: 'confirm.component.html'
|
templateUrl: './confirm.component.html'
|
||||||
})
|
})
|
||||||
export class ConfirmComponent {
|
export class ConfirmComponent {
|
||||||
@Input() okMsg = '';
|
@Input() okMsg = '';
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { Attribute, Component, Inject, Optional } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'hero-title',
|
selector: 'hero-title',
|
||||||
templateUrl: 'hero-title.component.html'
|
templateUrl: './hero-title.component.html'
|
||||||
})
|
})
|
||||||
// #enddocregion templateUrl
|
// #enddocregion templateUrl
|
||||||
export class HeroTitleComponent {
|
export class HeroTitleComponent {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'cli-quickstart-app',
|
selector: 'cli-quickstart-app',
|
||||||
templateUrl: 'cli-quickstart.component.html',
|
templateUrl: './cli-quickstart.component.html',
|
||||||
styleUrls: ['cli-quickstart.component.css']
|
styleUrls: ['./cli-quickstart.component.css']
|
||||||
})
|
})
|
||||||
// #enddocregion metadata
|
// #enddocregion metadata
|
||||||
// #docregion title, class
|
// #docregion title, class
|
||||||
|
|
|
@ -7,8 +7,8 @@ import { Component, ViewEncapsulation } from '@angular/core';
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'quest-summary',
|
selector: 'quest-summary',
|
||||||
// #docregion urls
|
// #docregion urls
|
||||||
templateUrl: 'quest-summary.component.html',
|
templateUrl: './quest-summary.component.html',
|
||||||
styleUrls: ['quest-summary.component.css']
|
styleUrls: ['./quest-summary.component.css']
|
||||||
// #enddocregion urls
|
// #enddocregion urls
|
||||||
})
|
})
|
||||||
export class QuestSummaryComponent { }
|
export class QuestSummaryComponent { }
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Hero } from './hero';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'hero-form',
|
selector: 'hero-form',
|
||||||
templateUrl: 'hero-form.component.html'
|
templateUrl: './hero-form.component.html'
|
||||||
})
|
})
|
||||||
export class HeroFormComponent {
|
export class HeroFormComponent {
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { Component } from '@angular/core';
|
||||||
selector: 'hello-world',
|
selector: 'hello-world',
|
||||||
|
|
||||||
// Location of the template for this component
|
// Location of the template for this component
|
||||||
templateUrl: 'hello_world.html'
|
templateUrl: './hello_world.html'
|
||||||
})
|
})
|
||||||
export class HelloWorldComponent {
|
export class HelloWorldComponent {
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent { }
|
export class AppComponent { }
|
||||||
|
|
|
@ -77,7 +77,7 @@ export class DoCheckComponent implements DoCheck {
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'do-check-parent',
|
selector: 'do-check-parent',
|
||||||
templateUrl: 'do-check-parent.component.html',
|
templateUrl: './do-check-parent.component.html',
|
||||||
styles: ['.parent {background: Lavender}']
|
styles: ['.parent {background: Lavender}']
|
||||||
})
|
})
|
||||||
export class DoCheckParentComponent {
|
export class DoCheckParentComponent {
|
||||||
|
|
|
@ -51,7 +51,7 @@ export class OnChangesComponent implements OnChanges {
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'on-changes-parent',
|
selector: 'on-changes-parent',
|
||||||
templateUrl: 'on-changes-parent.component.html',
|
templateUrl: './on-changes-parent.component.html',
|
||||||
styles: ['.parent {background: Lavender;}']
|
styles: ['.parent {background: Lavender;}']
|
||||||
})
|
})
|
||||||
export class OnChangesParentComponent {
|
export class OnChangesParentComponent {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { LoggerService } from './logger.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'spy-parent',
|
selector: 'spy-parent',
|
||||||
templateUrl: 'spy.component.html',
|
templateUrl: './spy.component.html',
|
||||||
styles: [
|
styles: [
|
||||||
'.parent {background: khaki;}',
|
'.parent {background: khaki;}',
|
||||||
'.heroes {background: LightYellow; padding: 0 8px}'
|
'.heroes {background: LightYellow; padding: 0 8px}'
|
||||||
|
|
|
@ -7,8 +7,8 @@ import { UserService } from '../user.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'app-contact',
|
selector: 'app-contact',
|
||||||
templateUrl: 'contact.component.html',
|
templateUrl: './contact.component.html',
|
||||||
styleUrls: [ 'contact.component.css' ]
|
styleUrls: [ './contact.component.css' ]
|
||||||
})
|
})
|
||||||
export class ContactComponent implements OnInit {
|
export class ContactComponent implements OnInit {
|
||||||
contact: Contact;
|
contact: Contact;
|
||||||
|
|
|
@ -8,8 +8,8 @@ import { UserService } from '../core/user.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'app-contact',
|
selector: 'app-contact',
|
||||||
templateUrl: 'contact.component.html',
|
templateUrl: './contact.component.html',
|
||||||
styleUrls: [ 'contact.component.css' ]
|
styleUrls: [ './contact.component.css' ]
|
||||||
})
|
})
|
||||||
export class ContactComponent implements OnInit {
|
export class ContactComponent implements OnInit {
|
||||||
contact: Contact;
|
contact: Contact;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { UserService } from '../core/user.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'app-title',
|
selector: 'app-title',
|
||||||
templateUrl: 'title.component.html',
|
templateUrl: './title.component.html',
|
||||||
})
|
})
|
||||||
export class TitleComponent {
|
export class TitleComponent {
|
||||||
@Input() subtitle = '';
|
@Input() subtitle = '';
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { UserService } from './user.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'app-title',
|
selector: 'app-title',
|
||||||
templateUrl: 'title.component.html',
|
templateUrl: './title.component.html',
|
||||||
})
|
})
|
||||||
export class TitleComponent {
|
export class TitleComponent {
|
||||||
@Input() subtitle = '';
|
@Input() subtitle = '';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
birthday = new Date(1988, 3, 15); // April 15, 1988
|
birthday = new Date(1988, 3, 15); // April 15, 1988
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { HEROES } from './heroes';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'flying-heroes',
|
selector: 'flying-heroes',
|
||||||
templateUrl: 'flying-heroes.component.html',
|
templateUrl: './flying-heroes.component.html',
|
||||||
styles: ['#flyers, #all {font-style: italic}']
|
styles: ['#flyers, #all {font-style: italic}']
|
||||||
})
|
})
|
||||||
// #docregion v1
|
// #docregion v1
|
||||||
|
@ -52,7 +52,7 @@ export class FlyingHeroesComponent {
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'flying-heroes-impure',
|
selector: 'flying-heroes-impure',
|
||||||
templateUrl: 'flying-heroes-impure.component.html',
|
templateUrl: './flying-heroes-impure.component.html',
|
||||||
// #enddocregion impure-component
|
// #enddocregion impure-component
|
||||||
styles: ['.flyers, .all {font-style: italic}'],
|
styles: ['.flyers, .all {font-style: italic}'],
|
||||||
// #docregion impure-component
|
// #docregion impure-component
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { slideInDownAnimation } from './animations';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
templateUrl: 'compose-message.component.html',
|
templateUrl: './compose-message.component.html',
|
||||||
styles: [ ':host { position: relative; bottom: 10%; }' ],
|
styles: [ ':host { position: relative; bottom: 10%; }' ],
|
||||||
animations: [ slideInDownAnimation ]
|
animations: [ slideInDownAnimation ]
|
||||||
})
|
})
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browse
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'bypass-security',
|
selector: 'bypass-security',
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
templateUrl: 'bypass-security.component.html',
|
templateUrl: './bypass-security.component.html',
|
||||||
})
|
})
|
||||||
export class BypassSecurityComponent {
|
export class BypassSecurityComponent {
|
||||||
dangerousUrl: string;
|
dangerousUrl: string;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'inner-html-binding',
|
selector: 'inner-html-binding',
|
||||||
templateUrl: 'inner-html-binding.component.html',
|
templateUrl: './inner-html-binding.component.html',
|
||||||
})
|
})
|
||||||
// #docregion class
|
// #docregion class
|
||||||
export class InnerHtmlBindingComponent {
|
export class InnerHtmlBindingComponent {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { HeroService } from './hero.service.promise';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'hero-list-promise',
|
selector: 'hero-list-promise',
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
templateUrl: 'hero-list.component.html',
|
templateUrl: './hero-list.component.html',
|
||||||
providers: [ HeroService ],
|
providers: [ HeroService ],
|
||||||
styles: ['.error {color:red;}']
|
styles: ['.error {color:red;}']
|
||||||
})
|
})
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { HeroService } from './hero.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'hero-list',
|
selector: 'hero-list',
|
||||||
templateUrl: 'hero-list.component.html',
|
templateUrl: './hero-list.component.html',
|
||||||
providers: [ HeroService ],
|
providers: [ HeroService ],
|
||||||
styles: ['.error {color:red;}']
|
styles: ['.error {color:red;}']
|
||||||
})
|
})
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { WikipediaService } from './wikipedia.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-wiki-smart',
|
selector: 'my-wiki-smart',
|
||||||
templateUrl: 'wiki.component.html',
|
templateUrl: './wiki.component.html',
|
||||||
providers: [ WikipediaService ]
|
providers: [ WikipediaService ]
|
||||||
})
|
})
|
||||||
export class WikiSmartComponent implements OnInit {
|
export class WikiSmartComponent implements OnInit {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'structural-directives',
|
selector: 'structural-directives',
|
||||||
templateUrl: 'structural-directives.component.html',
|
templateUrl: './structural-directives.component.html',
|
||||||
styles: ['button { min-width: 100px; }']
|
styles: ['button { min-width: 100px; }']
|
||||||
})
|
})
|
||||||
export class StructuralDirectivesComponent {
|
export class StructuralDirectivesComponent {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { HeroService } from './heroes';
|
||||||
template: `
|
template: `
|
||||||
<toh-heroes></toh-heroes>
|
<toh-heroes></toh-heroes>
|
||||||
`,
|
`,
|
||||||
styleUrls: ['app.component.css'],
|
styleUrls: ['./app.component.css'],
|
||||||
providers: [ HeroService ]
|
providers: [ HeroService ]
|
||||||
})
|
})
|
||||||
export class AppComponent { }
|
export class AppComponent { }
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { ExceptionService, SpinnerService, ToastService } from './core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'sg-app',
|
selector: 'sg-app',
|
||||||
templateUrl: 'app.component.html',
|
templateUrl: './app.component.html',
|
||||||
providers: [HeroService, ExceptionService, SpinnerService, ToastService]
|
providers: [HeroService, ExceptionService, SpinnerService, ToastService]
|
||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Component, OnInit } from '@angular/core';
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
// #docregion example
|
// #docregion example
|
||||||
selector: 'toh-heroes',
|
selector: 'toh-heroes',
|
||||||
templateUrl: 'heroes.component.html'
|
templateUrl: './heroes.component.html'
|
||||||
})
|
})
|
||||||
export class HeroesComponent implements OnInit {
|
export class HeroesComponent implements OnInit {
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { FilterTextService } from '../shared/filter-text/filter-text.service';
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
// #docregion example
|
// #docregion example
|
||||||
selector: 'toh-heroes',
|
selector: 'toh-heroes',
|
||||||
templateUrl: 'heroes.component.html'
|
templateUrl: './heroes.component.html'
|
||||||
})
|
})
|
||||||
export class HeroesComponent implements OnInit {
|
export class HeroesComponent implements OnInit {
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
|
|
@ -4,8 +4,8 @@ import { Component, OnInit } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'toh-nav',
|
selector: 'toh-nav',
|
||||||
templateUrl: 'nav.component.html',
|
templateUrl: './nav.component.html',
|
||||||
styleUrls: ['nav.component.css'],
|
styleUrls: ['./nav.component.css'],
|
||||||
})
|
})
|
||||||
export class NavComponent implements OnInit {
|
export class NavComponent implements OnInit {
|
||||||
menuItems = [
|
menuItems = [
|
||||||
|
|
|
@ -8,8 +8,8 @@ import { SpinnerState, SpinnerService } from './spinner.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'toh-spinner',
|
selector: 'toh-spinner',
|
||||||
templateUrl: 'spinner.component.html',
|
templateUrl: './spinner.component.html',
|
||||||
styleUrls: ['spinner.component.css']
|
styleUrls: ['./spinner.component.css']
|
||||||
})
|
})
|
||||||
export class SpinnerComponent implements OnDestroy, OnInit {
|
export class SpinnerComponent implements OnDestroy, OnInit {
|
||||||
visible = false;
|
visible = false;
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { SpinnerService } from '../core/spinner/spinner.service';
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
// #docregion example
|
// #docregion example
|
||||||
selector: 'toh-heroes',
|
selector: 'toh-heroes',
|
||||||
templateUrl: 'heroes.component.html'
|
templateUrl: './heroes.component.html'
|
||||||
})
|
})
|
||||||
export class HeroesComponent {
|
export class HeroesComponent {
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
|
|
@ -4,8 +4,8 @@ import { Component, OnInit } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'toh-nav',
|
selector: 'toh-nav',
|
||||||
templateUrl: 'nav.component.html',
|
templateUrl: './nav.component.html',
|
||||||
styleUrls: ['nav.component.css'],
|
styleUrls: ['./nav.component.css'],
|
||||||
})
|
})
|
||||||
export class NavComponent implements OnInit {
|
export class NavComponent implements OnInit {
|
||||||
menuItems = [
|
menuItems = [
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { LoggerService } from '../core/logger.service';
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
// #docregion example
|
// #docregion example
|
||||||
selector: 'toh-heroes',
|
selector: 'toh-heroes',
|
||||||
templateUrl: 'heroes.component.html'
|
templateUrl: './heroes.component.html'
|
||||||
})
|
})
|
||||||
export class HeroesComponent {
|
export class HeroesComponent {
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'sg-app',
|
selector: 'sg-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent { }
|
export class AppComponent { }
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { Component } from '@angular/core';
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
// #docregion example
|
// #docregion example
|
||||||
selector: 'tohHeroButton',
|
selector: 'tohHeroButton',
|
||||||
templateUrl: 'hero-button.component.html'
|
templateUrl: './hero-button.component.html'
|
||||||
})
|
})
|
||||||
export class HeroButtonComponent {}
|
export class HeroButtonComponent {}
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Component } from '@angular/core';
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
// #docregion example
|
// #docregion example
|
||||||
selector: 'toh-hero-button',
|
selector: 'toh-hero-button',
|
||||||
templateUrl: 'hero-button.component.html'
|
templateUrl: './hero-button.component.html'
|
||||||
})
|
})
|
||||||
export class HeroButtonComponent {}
|
export class HeroButtonComponent {}
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'sg-app',
|
selector: 'sg-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent { }
|
export class AppComponent { }
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { Component } from '@angular/core';
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
// #docregion example
|
// #docregion example
|
||||||
selector: '[tohHeroButton]',
|
selector: '[tohHeroButton]',
|
||||||
templateUrl: 'hero-button.component.html'
|
templateUrl: './hero-button.component.html'
|
||||||
})
|
})
|
||||||
export class HeroButtonComponent {}
|
export class HeroButtonComponent {}
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Component } from '@angular/core';
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
// #docregion example
|
// #docregion example
|
||||||
selector: 'toh-hero-button',
|
selector: 'toh-hero-button',
|
||||||
templateUrl: 'hero-button.component.html'
|
templateUrl: './hero-button.component.html'
|
||||||
})
|
})
|
||||||
export class HeroButtonComponent {}
|
export class HeroButtonComponent {}
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
|
|
@ -10,8 +10,8 @@ import { Hero } from './shared';
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
// #docregion example
|
// #docregion example
|
||||||
selector: 'toh-heroes',
|
selector: 'toh-heroes',
|
||||||
templateUrl: 'heroes.component.html',
|
templateUrl: './heroes.component.html',
|
||||||
styleUrls: ['heroes.component.css']
|
styleUrls: ['./heroes.component.css']
|
||||||
})
|
})
|
||||||
export class HeroesComponent implements OnInit {
|
export class HeroesComponent implements OnInit {
|
||||||
heroes: Hero[];
|
heroes: Hero[];
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'sg-app',
|
selector: 'sg-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent { }
|
export class AppComponent { }
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'sg-app',
|
selector: 'sg-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent { }
|
export class AppComponent { }
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'sg-app',
|
selector: 'sg-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent { }
|
export class AppComponent { }
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { Hero, HeroService } from './heroes';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'sg-app',
|
selector: 'sg-app',
|
||||||
templateUrl: 'app.component.html',
|
templateUrl: './app.component.html',
|
||||||
providers: [HeroService]
|
providers: [HeroService]
|
||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent { }
|
export class AppComponent { }
|
||||||
|
|
|
@ -19,7 +19,7 @@ export enum Color {Red, Green, Blue};
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent implements AfterViewInit, OnInit {
|
export class AppComponent implements AfterViewInit, OnInit {
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent { }
|
export class AppComponent { }
|
||||||
|
|
|
@ -251,7 +251,7 @@ export class TestViewProvidersComponent {
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'external-template-comp',
|
selector: 'external-template-comp',
|
||||||
templateUrl: 'bag-external-template.html'
|
templateUrl: './bag-external-template.html'
|
||||||
})
|
})
|
||||||
export class ExternalTemplateComponent implements OnInit {
|
export class ExternalTemplateComponent implements OnInit {
|
||||||
serviceValue: string;
|
serviceValue: string;
|
||||||
|
@ -275,7 +275,7 @@ export class InnerCompWithExternalTemplateComponent { }
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'bad-template-comp',
|
selector: 'bad-template-comp',
|
||||||
templateUrl: 'non-existant.html'
|
templateUrl: './non-existant.html'
|
||||||
})
|
})
|
||||||
export class BadTemplateUrlComponent { }
|
export class BadTemplateUrlComponent { }
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'app-banner',
|
selector: 'app-banner',
|
||||||
templateUrl: 'banner.component.html',
|
templateUrl: './banner.component.html',
|
||||||
styleUrls: ['banner.component.css']
|
styleUrls: ['./banner.component.css']
|
||||||
})
|
})
|
||||||
export class BannerComponent {
|
export class BannerComponent {
|
||||||
title = 'Test Tour of Heroes';
|
title = 'Test Tour of Heroes';
|
||||||
|
|
|
@ -7,8 +7,8 @@ import { Hero } from '../model';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'dashboard-hero',
|
selector: 'dashboard-hero',
|
||||||
templateUrl: 'dashboard-hero.component.html',
|
templateUrl: './dashboard-hero.component.html',
|
||||||
styleUrls: [ 'dashboard-hero.component.css' ]
|
styleUrls: [ './dashboard-hero.component.css' ]
|
||||||
})
|
})
|
||||||
export class DashboardHeroComponent {
|
export class DashboardHeroComponent {
|
||||||
@Input() hero: Hero;
|
@Input() hero: Hero;
|
||||||
|
|
|
@ -7,8 +7,8 @@ import { Hero, HeroService } from '../model';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'app-dashboard',
|
selector: 'app-dashboard',
|
||||||
templateUrl: 'dashboard.component.html',
|
templateUrl: './dashboard.component.html',
|
||||||
styleUrls: [ 'dashboard.component.css' ]
|
styleUrls: [ './dashboard.component.css' ]
|
||||||
})
|
})
|
||||||
export class DashboardComponent implements OnInit {
|
export class DashboardComponent implements OnInit {
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ import { HeroDetailService } from './hero-detail.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'app-hero-detail',
|
selector: 'app-hero-detail',
|
||||||
templateUrl: 'hero-detail.component.html',
|
templateUrl: './hero-detail.component.html',
|
||||||
styleUrls: ['hero-detail.component.css' ],
|
styleUrls: ['./hero-detail.component.css' ],
|
||||||
providers: [ HeroDetailService ]
|
providers: [ HeroDetailService ]
|
||||||
})
|
})
|
||||||
export class HeroDetailComponent implements OnInit {
|
export class HeroDetailComponent implements OnInit {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import { Hero, HeroService } from '../model';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'app-heroes',
|
selector: 'app-heroes',
|
||||||
templateUrl: 'hero-list.component.html',
|
templateUrl: './hero-list.component.html',
|
||||||
styleUrls: [ 'hero-list.component.css' ]
|
styleUrls: [ './hero-list.component.css' ]
|
||||||
})
|
})
|
||||||
export class HeroListComponent implements OnInit {
|
export class HeroListComponent implements OnInit {
|
||||||
heroes: Promise<Hero[]>;
|
heroes: Promise<Hero[]>;
|
||||||
|
|
|
@ -15,7 +15,7 @@ import { Component } from '@angular/core';
|
||||||
`,
|
`,
|
||||||
// #enddocregion template
|
// #enddocregion template
|
||||||
// #docregion styleUrls
|
// #docregion styleUrls
|
||||||
styleUrls: ['app.component.css'],
|
styleUrls: ['./app.component.css'],
|
||||||
// #enddocregion styleUrls
|
// #enddocregion styleUrls
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
|
|
@ -10,10 +10,10 @@ import { HeroService } from './hero.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-dashboard',
|
selector: 'my-dashboard',
|
||||||
templateUrl: 'dashboard.component.html',
|
templateUrl: './dashboard.component.html',
|
||||||
// #enddocregion metadata
|
// #enddocregion metadata
|
||||||
// #docregion css
|
// #docregion css
|
||||||
styleUrls: [ 'dashboard.component.css' ]
|
styleUrls: [ './dashboard.component.css' ]
|
||||||
// #enddocregion css
|
// #enddocregion css
|
||||||
// #docregion metadata
|
// #docregion metadata
|
||||||
})
|
})
|
||||||
|
|
|
@ -12,9 +12,9 @@ import { HeroService } from './hero.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-hero-detail',
|
selector: 'my-hero-detail',
|
||||||
templateUrl: 'hero-detail.component.html',
|
templateUrl: './hero-detail.component.html',
|
||||||
// #enddocregion metadata, v2
|
// #enddocregion metadata, v2
|
||||||
styleUrls: [ 'hero-detail.component.css' ]
|
styleUrls: [ './hero-detail.component.css' ]
|
||||||
// #docregion metadata, v2
|
// #docregion metadata, v2
|
||||||
})
|
})
|
||||||
// #enddocregion metadata
|
// #enddocregion metadata
|
||||||
|
|
|
@ -13,8 +13,8 @@ import { HeroService } from './hero.service';
|
||||||
// #docregion renaming
|
// #docregion renaming
|
||||||
selector: 'my-heroes',
|
selector: 'my-heroes',
|
||||||
// #enddocregion renaming
|
// #enddocregion renaming
|
||||||
templateUrl: 'heroes.component.html',
|
templateUrl: './heroes.component.html',
|
||||||
styleUrls: [ 'heroes.component.css' ]
|
styleUrls: [ './heroes.component.css' ]
|
||||||
// #docregion renaming
|
// #docregion renaming
|
||||||
})
|
})
|
||||||
// #enddocregion metadata
|
// #enddocregion metadata
|
||||||
|
|
|
@ -13,7 +13,7 @@ import { Component } from '@angular/core';
|
||||||
</nav>
|
</nav>
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
`,
|
`,
|
||||||
styleUrls: ['app.component.css']
|
styleUrls: ['./app.component.css']
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
title = 'Tour of Heroes';
|
title = 'Tour of Heroes';
|
||||||
|
|
|
@ -7,8 +7,8 @@ import { HeroService } from './hero.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-dashboard',
|
selector: 'my-dashboard',
|
||||||
templateUrl: 'dashboard.component.html',
|
templateUrl: './dashboard.component.html',
|
||||||
styleUrls: [ 'dashboard.component.css' ]
|
styleUrls: [ './dashboard.component.css' ]
|
||||||
})
|
})
|
||||||
// #enddocregion search
|
// #enddocregion search
|
||||||
export class DashboardComponent implements OnInit {
|
export class DashboardComponent implements OnInit {
|
||||||
|
|
|
@ -10,8 +10,8 @@ import { HeroService } from './hero.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-hero-detail',
|
selector: 'my-hero-detail',
|
||||||
templateUrl: 'hero-detail.component.html',
|
templateUrl: './hero-detail.component.html',
|
||||||
styleUrls: [ 'hero-detail.component.css' ]
|
styleUrls: [ './hero-detail.component.css' ]
|
||||||
})
|
})
|
||||||
export class HeroDetailComponent implements OnInit {
|
export class HeroDetailComponent implements OnInit {
|
||||||
hero: Hero;
|
hero: Hero;
|
||||||
|
|
|
@ -11,8 +11,8 @@ import { Hero } from './hero';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'hero-search',
|
selector: 'hero-search',
|
||||||
templateUrl: 'hero-search.component.html',
|
templateUrl: './hero-search.component.html',
|
||||||
styleUrls: [ 'hero-search.component.css' ],
|
styleUrls: [ './hero-search.component.css' ],
|
||||||
providers: [HeroSearchService]
|
providers: [HeroSearchService]
|
||||||
})
|
})
|
||||||
export class HeroSearchComponent implements OnInit {
|
export class HeroSearchComponent implements OnInit {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import { HeroService } from './hero.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-heroes',
|
selector: 'my-heroes',
|
||||||
templateUrl: 'heroes.component.html',
|
templateUrl: './heroes.component.html',
|
||||||
styleUrls: [ 'heroes.component.css' ]
|
styleUrls: [ './heroes.component.css' ]
|
||||||
})
|
})
|
||||||
export class HeroesComponent implements OnInit {
|
export class HeroesComponent implements OnInit {
|
||||||
heroes: Hero[];
|
heroes: Hero[];
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { Phone, PhoneData } from '../core/phone/phone.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'phone-detail',
|
selector: 'phone-detail',
|
||||||
templateUrl: 'phone-detail.template.html',
|
templateUrl: './phone-detail.template.html',
|
||||||
// #enddocregion initialclass
|
// #enddocregion initialclass
|
||||||
// #docregion initialclass
|
// #docregion initialclass
|
||||||
})
|
})
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Phone, PhoneData } from '../core/phone/phone.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'phone-detail',
|
selector: 'phone-detail',
|
||||||
templateUrl: 'phone-detail.template.html'
|
templateUrl: './phone-detail.template.html'
|
||||||
})
|
})
|
||||||
export class PhoneDetailComponent {
|
export class PhoneDetailComponent {
|
||||||
phone: PhoneData;
|
phone: PhoneData;
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { Phone, PhoneData } from '../core/phone/phone.service';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'phone-list',
|
selector: 'phone-list',
|
||||||
templateUrl: 'phone-list.template.html',
|
templateUrl: './phone-list.template.html',
|
||||||
})
|
})
|
||||||
// #enddocregion top
|
// #enddocregion top
|
||||||
export class PhoneListComponent {
|
export class PhoneListComponent {
|
||||||
|
|
|
@ -4,6 +4,6 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: 'app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
export class AppComponent { }
|
export class AppComponent { }
|
||||||
|
|
|
@ -64,7 +64,8 @@ include ../_util-fns
|
||||||
relative to the component class file simply by setting the `moduleId` property of the `@Component` metadata like this
|
relative to the component class file simply by setting the `moduleId` property of the `@Component` metadata like this
|
||||||
+makeExample('cb-component-relative-paths/ts/app/some.component.ts','module-id')(format='.')
|
+makeExample('cb-component-relative-paths/ts/app/some.component.ts','module-id')(format='.')
|
||||||
:marked
|
:marked
|
||||||
We strip the `app/` base path from the `templateUrl` and `styleUrls`. The result looks like this:
|
We strip the `app/` base path from the `templateUrl` and `styleUrls` and replace it with `./`.
|
||||||
|
The result looks like this:
|
||||||
+makeExample('cb-component-relative-paths/ts/app/some.component.ts','relative-config')(format='.')
|
+makeExample('cb-component-relative-paths/ts/app/some.component.ts','relative-config')(format='.')
|
||||||
|
|
||||||
.alert.is-helpful
|
.alert.is-helpful
|
||||||
|
|
|
@ -249,7 +249,7 @@ a#class-metadata
|
||||||
`)(format='.')
|
`)(format='.')
|
||||||
|
|
||||||
:marked
|
:marked
|
||||||
Note that the _TypeScript_ and both _ES6_ `templateUrl` properties identify the location of the template file _relative to the component module_.
|
Note that both the _TypeScript_ and _ES6_ `templateUrl` properties identify the location of the template file _relative to the component module_.
|
||||||
All three metadata configurations specify the `moduleId` property
|
All three metadata configurations specify the `moduleId` property
|
||||||
so that Angular can calculate the proper module address.
|
so that Angular can calculate the proper module address.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue