草庐IT

totlaBalance

全部标签

javascript - 回调值中的 Angular 2 函数不更新 View

我已经创建了函数和内部函数我在回调响应后调用一个回调函数我有更新字符串变量但是这个字符串变量没有更新我的View。import{Component}from'angular2/core';@Component({selector:"myview"templateUrl:'app/view/myview.component.html'})exportclassViewComponent{getAddress:string;publictotlaBalance:string;getBalance():void{varself=this;getBalanceData(this.getAddr