RT目标是模拟异步请求利用服务,将hellos输出此时将hellos输出<div ng-app="myApp">
<div ng-controller="MyCtrl as ctrl" ng-bind="ctrl.hellos"></div></div>控制台没有报错,视图也不显示,请问是什么原因?
1 回答

侃侃无极
TA贡献2051条经验 获得超10个赞
低级错误……
function MyCtrl(helloWorld) { var self = this helloWorld.sayHello().then(function(text){ self.hellos = text },function(msg){ self.hellos = msg }) }
添加回答
举报
0/150
提交
取消