O'Reilly logo

Mastering AngularJS for .NET Developers by Mohammad Wadood Majid, Golrokh Mirzaei

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding controllers

As we develop the presentation layer using HTML and JavaScript, the presentation layer becomes more complex, especially when we wire up the JavaScript code with HTML elements on the page. For example, to fire an event in order to call the JavaScript function, the business logic is not directly involved with the page and implements data access layer code using an Ajax call to the data access layer code. AngularJS controllers are the fundamental entry points to the presentation layer. The controllers contain all the functions that we need to call a page. We can call an AngularJS controller in the DOM using the ng-controller directive, which is much simpler than calling the traditional JavaScript.

In order to create an AngularJS ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required