docs: ignore files from app compilation for ngmodule-faq example (#28592)

PR Close #28592
This commit is contained in:
Brandon 2019-02-07 16:55:46 +00:00 committed by Miško Hevery
parent 2852beaded
commit 21b5940abd
7 changed files with 3 additions and 47 deletions

View File

@ -13,8 +13,8 @@ import { AppComponent } from './app.component';
// #enddocregion
*/
// #docregion
import { HighlightDirective } from './highlight.directive';
import { TitleComponent } from './title.component';
import { HighlightDirective } from './highlight.directive.1';
import { TitleComponent } from './title.component.1';
import { UserService } from './user.service';
/* Routing Module */

View File

@ -1,10 +0,0 @@
// #docregion
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({ name: 'awesome' })
/** Precede the input string with the word "Awesome " */
export class AwesomePipe implements PipeTransform {
transform(phrase: string) {
return phrase ? 'Awesome ' + phrase : '';
}
}

View File

@ -1,20 +0,0 @@
// #docplaster
// Same directive name and selector as
// HighlightDirective in parent AppModule
// It selects for both input boxes and 'highlight' attr
// and it highlights in blue instead of gold
// #docregion
import { Directive, ElementRef } from '@angular/core';
// Highlight the host element or any InputElement in blue
@Directive({ selector: '[highlight], input' })
export class ContactHighlightDirective {
constructor(el: ElementRef) {
el.nativeElement.style.backgroundColor = 'powderblue';
// #enddocregion
console.log(`* Contact highlight called for ${el.nativeElement.tagName}`);
// #docregion
}
}
// #enddocregion

View File

@ -1,14 +0,0 @@
// #docregion
import { Directive, ElementRef } from '@angular/core';
// Same directive name and selector as
// HighlightDirective in parent AppRootModule
// It selects for both input boxes and 'highlight' attr
// and it highlights in beige instead of yellow
@Directive({ selector: '[highlight]' })
export class HighlightDirective {
constructor(el: ElementRef) {
el.nativeElement.style.backgroundColor = 'beige';
console.log(`* Hero highlight called for ${el.nativeElement.tagName}`);
}
}

View File

@ -8,7 +8,7 @@ import { UserService } from './user.service';
@Component({
selector: 'app-title',
templateUrl: './title.component.html'
templateUrl: './title.component.1.html'
})
export class TitleComponent {
title = 'Angular Modules';