cgross / angular-busy

Show busy/loading indicators on any element during $http requests (or any promise).
http://cgross.github.io/angular-busy/demo
MIT License
1.44k stars 256 forks source link

Doesn't work with Angular's "Controller as" syntax #71

Closed pulkitsinghal closed 9 years ago

pulkitsinghal commented 9 years ago

Using the Angular's "Controller as" syntax breaks:

Error: [ng:areq] Argument 'MyCtrl' is not a function, got undefined
http://errors.angularjs.org/1.3.16/ng/areq?p0=MyCtrl&p1=not%20aNaNunction%2C%20got%20undefined
    at https://site.me/bower_components/angular/angular.js:63:12

Here's a sample html that breaks:

<div class="container" ng-controller="MyCtrl as myController">
    <div class="row main-container" cg-busy="myController.myPromise">
</div>

Why would this happen? I can't help but feel that this may not be a angular-busy issue. What do you think?

pulkitsinghal commented 9 years ago

It was a missing carat that had broken the entire index.html ... everything is fine.