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

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -