cannot write an angular ui typeahed handler with typescript -



cannot write an angular ui typeahed handler with typescript -

i'm writing angular controller using typescript, , i'm using angular ui typeahead receive error during phone call update handler. angular directive

<input type="text" ng-model="vm.censimento.quartiere" placeholder="prima selezionare il comune" typeahead="address address in vm.updatequartieri($viewvalue)" typeahead-loading="loadinglocations" class="form-control" /> <i ng-show="loadinglocations" class="glyphicon glyphicon-refresh"></i>

this typescript routine

public updatequartieri = (typed: string) => { var filtro: factories.filtroricercaquartieri = new factories.filtroricercaquartieri(); filtro.testo = typed; filtro.idcomune = this.censimento.comuneid; var ultimipromise = this.censimentofactory.quartiericomune(filtro); ultimipromise.then((data: string[]) => { this.quartieri = data; }, (reason) => { alert('errore in recupero lista tipi via: ' + reason); }, (update) => { alert('got notification: ' + update); }); }

i suppose problem routine never homecoming value, how can alter routine homecoming result of server phone call ?

found solution, have homecoming promise object changing in

public updatequartieri = (typed: string) => { var filtro: factories.filtroricercaquartieri = new factories.filtroricercaquartieri(); filtro.testo = typed; filtro.idcomune = this.censimento.comuneid; var ultimipromise = this.censimentofactory.quartiericomune(filtro); homecoming ultimipromise; }

typescript angular-ui

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -