docs(aio): rename cb- files and a few others
This commit is contained in:

committed by
Pete Bacon Darwin

parent
c3fa8803d3
commit
93516ea8a1
@ -0,0 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'sg-app',
|
||||
template: '<input type="text" tohValidate>'
|
||||
})
|
||||
export class AppComponent { }
|
19
aio/content/examples/styleguide/src/02-08/app/app.module.ts
Normal file
19
aio/content/examples/styleguide/src/02-08/app/app.module.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { InputHighlightDirective,
|
||||
ValidateDirective } from './shared';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([{ path: '02-08', component: AppComponent }])
|
||||
],
|
||||
declarations: [
|
||||
AppComponent,
|
||||
InputHighlightDirective,
|
||||
ValidateDirective
|
||||
],
|
||||
exports: [ AppComponent ]
|
||||
})
|
||||
export class AppModule {}
|
2
aio/content/examples/styleguide/src/02-08/app/index.ts
Normal file
2
aio/content/examples/styleguide/src/02-08/app/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './shared';
|
||||
export * from './app.component';
|
@ -0,0 +1,2 @@
|
||||
export * from './input-highlight.directive';
|
||||
export * from './validate.directive';
|
@ -0,0 +1,10 @@
|
||||
// #docregion
|
||||
import { Directive, ElementRef } from '@angular/core';
|
||||
|
||||
@Directive({ selector: 'input'})
|
||||
/** Highlight the attached input text element in blue */
|
||||
export class InputHighlightDirective {
|
||||
constructor(el: ElementRef) {
|
||||
el.nativeElement.style.backgroundColor = 'powderblue';
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
// #docregion
|
||||
import { Directive } from '@angular/core';
|
||||
// #docregion example
|
||||
/* avoid */
|
||||
|
||||
@Directive({
|
||||
selector: '[validate]'
|
||||
})
|
||||
export class ValidateDirective {}
|
||||
// #enddocregion example
|
@ -0,0 +1,9 @@
|
||||
// #docregion
|
||||
import { Directive } from '@angular/core';
|
||||
|
||||
// #docregion example
|
||||
@Directive({
|
||||
selector: '[tohValidate]'
|
||||
})
|
||||
export class ValidateDirective {}
|
||||
// #enddocregion example
|
Reference in New Issue
Block a user