Saturday, 15 June 2013

angularjs - Angular doesn't bind data from controller with bindToController -


I am struggling with this issue for a long time. AngularJS does not just bind data if I bind it in the controller context. And if I try to convert it to a simple binding through the $ radius - everything works

It moves along the line which assigns the load to the load Comments - Strangely, if I remove it, then everything works.

Kang's version is 1.4.0-beta.5.

Here's my code:

  Angular. Modules ('mine-app'). 'Mycomments' guided, - & gt; Director = Restricted: 'E' Area: Correct Controller: 'NotiController' Controller: 'ctrl' bindToController: Correct Template: 'comments.html' Replaces: True Controller 'Comments Controller', () - & gt; This.name = 'comments' this.loadComments = - & gt; // template here section header header ng-bind = 'ctrl.name'  

Thanks!

Really got the answer - you have to get it back clearly at the end of the controller. , But it seems that the framework decides whether to add it to the radius, or not

, depending on the return result.

No comments:

Post a Comment