This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
public/docs/_examples/server-communication/ts/app/wiki Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11/* tslint:disable: member-ordering forin */
22// #docplaster
33// #docregion
4- import { Component } from '@angular/core' ;
4+ import { Component , OnInit } from '@angular/core' ;
55import { Observable } from 'rxjs/Observable' ;
66// #docregion import-subject
77import { Subject } from 'rxjs/Subject' ;
@@ -15,7 +15,7 @@ import { WikipediaService } from './wikipedia.service';
1515 templateUrl : 'wiki.component.html' ,
1616 providers : [ WikipediaService ]
1717} )
18- export class WikiSmartComponent {
18+ export class WikiSmartComponent implements OnInit {
1919 title = 'Smarter Wikipedia Demo' ;
2020 fetches = 'Fetches when typing stops' ;
2121 items : Observable < string [ ] > ;
@@ -25,7 +25,9 @@ export class WikiSmartComponent {
2525 search ( term : string ) { this . searchTermStream . next ( term ) ; }
2626 // #enddocregion subject
2727
28- constructor ( private wikipediaService : WikipediaService ) {
28+ constructor ( private wikipediaService : WikipediaService ) { }
29+
30+ ngOnInit ( ) {
2931 // #docregion observable-operators
3032 this . items = this . searchTermStream
3133 . debounceTime ( 300 )
You can’t perform that action at this time.
0 commit comments