1×
Become a member
to unlock all features

Create egghead account to access 5000+ tutorials and resources from expert developers.

Create account
Autoplay

    An Alternative Approach to Controllers

    angularjsAngularJS

    AngularJS makes your HTML very declarative. However, seeing the functions invoked in your HTML may not offer any clues as to what controller defines said functions. This video offers an approach to solving this problem by returning the controller in the controller definition so that we can opt for something like ng-click="SomeCtrl.doesSomething()" instead of simply writing ng-click="doesSomething()".