javascript - Angular 2 mode = "Observable" what does it do? -
i working on angular 2 project , came across tutorial used format. using observable interact database , retrieve data , component subscribing service happening. tutorial had
mode = 'observable';
what do? can't seem find online. can assume does, necessary?
export class taxratelookupcomponent { errormessage: string; mode = 'observable'; taxrate: taxrate[]; constructor( private taxratelookupservice: taxratelookupservice, public route: activatedroute, ) {} gettaxrate(search) { this.taxratelookupservice.gettaxrate(search) .subscribe( taxrate => this.taxrate = taxrate, error => this.errormessage = <any>error); } }
Comments
Post a Comment