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,18 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
import { ExceptionService } from './core';
|
||||
|
||||
@Component({
|
||||
selector: 'sg-app',
|
||||
template: '<div>The expected error is {{errorCode}}</div>',
|
||||
providers: [ExceptionService]
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
errorCode: number;
|
||||
|
||||
constructor(private exceptionService: ExceptionService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.errorCode = this.exceptionService.getException();
|
||||
}
|
||||
}
|
15
aio/content/examples/styleguide/src/03-01/app/app.module.ts
Normal file
15
aio/content/examples/styleguide/src/03-01/app/app.module.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([{ path: '03-01', component: AppComponent }])
|
||||
],
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
exports: [ AppComponent ]
|
||||
})
|
||||
export class AppModule {}
|
@ -0,0 +1,11 @@
|
||||
// #docregion
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
// #docregion example
|
||||
/* avoid */
|
||||
|
||||
export class exceptionService {
|
||||
constructor() { }
|
||||
}
|
||||
// #enddocregion example
|
@ -0,0 +1,14 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
// #docregion example
|
||||
export class ExceptionService {
|
||||
constructor() { }
|
||||
// #enddocregion example
|
||||
// testing harness
|
||||
getException() { return 42; }
|
||||
// #docregion example
|
||||
}
|
||||
// #enddocregion example
|
@ -0,0 +1 @@
|
||||
export * from './exception.service';
|
2
aio/content/examples/styleguide/src/03-01/app/index.ts
Normal file
2
aio/content/examples/styleguide/src/03-01/app/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './core';
|
||||
export * from './app.component';
|
Reference in New Issue
Block a user