AngularJS

AngularJS – $watch() , $digest() and $apply()

The AngularJS $scope functions $watch(), $digest() and $apply() are some of the central functions in AngularJS. Understanding $watch(), $digest() and $apply() is essential in order to understand AngularJS. When you create a data binding from somewhere in your view to a variable on the $scope object, AngularJS creates a "watch" internally. A watch means that… Continue reading AngularJS – $watch() , $digest() and $apply()

Advertisements
AngularJS

AngularJS – Routing

AngularJS routes enable you to create different URLs for different content in your application. Having different URLs for different content enables the user to bookmark URLs to specific content, and send those URLs to friends etc. In AngularJS each such bookmarkable URL is called a route. AngularJS routes enables you to show different content depending… Continue reading AngularJS – Routing

AngularJS

AngularJs – Asynchronous Behavior with Promises and $q

  what's  a promise ? A promise is a method of resolving a value (or not) in an asynchronous manner. Promises are objects that represent the return value or thrown exception that a function may eventually provide. Promises are incredibly useful in dealing with remote objects, and we can think of them as a proxy… Continue reading AngularJs – Asynchronous Behavior with Promises and $q

AngularJS

AngularJs – Custom Service

In this article we're going to learn why and how to build custom services in AngularJS. Before talking about service we need to talk about controller responsibilities. we use controllers to: Setup initial state of $scope. Add behaviors to the $scope. we DON'T use controllers to: Handle business logic directly. Share code state across controllers.… Continue reading AngularJs – Custom Service

AngularJS

Digest Cycle in AngularJS

I'm going to explore the Angular digest cycle, which is the process behind Angular data binding. I hope that help all of you to have a good understanding of AngularJS digest life-cycle. We're familiar with the event queue. When a user clicks something or types something in, those click and key press or up events go unto the event… Continue reading Digest Cycle in AngularJS

AngularJS

ModelView vs Controller clarification

If we set aside angular for a second and strictly look at MVVM, we see that it is a common design pattern. A design pattern gives us,  a "cookie cutter" approach to solving common development problems. Really as developers, we are constantly fighting complexity. Our goal should be to write software that is clear, concise… Continue reading ModelView vs Controller clarification