AngularJSFront End DevelopmentTechnology
Modularizing your application is a good practice because it makes the components reusable, configurable and testable. As we know that angular is on the global scope itself whereas angular.module is a global place to create, register or retrieve angular modules. In other words, angular.module is a container for other units of your angular application like […]
AngularJSFront End Development
In AngularJS, immediate model updates is a default behavior but if we want to persist value in the object after a certain time period has elapsed then we can achieve the same by using “debounce” object in “ng-model-options” directive, which is known as “non-immediate model updates”. Immediate Model updates [html] <div ng-app="MyApp"> <input type="text" ng-model="message"> […]
Polymer is not another framework, in fact it sits a layer below all these frameworks. It is used to create actual HTML elements, which are independent of the implementation on top of them. Take for example a simple HTML button, it works on every browser, has roughly the same visuals and functionality. A button on the web can work with any of the front end frameworks.
AngularJSFront End Development
When a function of service or controller invoked via the injector then we have to annotate these functions so that the injector knows what service to inject into the function. In Angular, there are three ways of annotating code with service name – Inline Array Annotation $inject Property Annotation Implicit Annotation Inline Array Annotation This […]
AngularJSFront End Development
In AngularJS, there are three ways to register a service in a module. Module’s Factory Function Module’s Config via $provide Module’s Service Function Via Module’s Factory Function We can register a service via Angular module’s “factory” function. This is commonly use to register a service. Registering service in the module [java] var myApp = angular.module(‘myApp’, […]
AngularJSFront End Development
AngularJS Deferred & Promises- Basic Understanding Table of Contents 1. Introduction to Asynchronous AngularJs 2. Callbacks- Basic Understanding 3. Callback Hell 4. Promise- A Better way of handling callbacks 5. Promise In AngularJS- $q Service 6. Deferred API 7. Promise API 8. Some other promise based AngularJs Services 9. Some other useful features- $q.all() 1. Introduction to […]
AngularJSFront End Development
Angular provides a very powerful means to transfer messages to scopes at different hierarchical level. We can dispatch an event upwards through the scope hierarchy by notifying all the registered “$rootScope.Scope” listeners in the hierarchy or downwards to all the child scopes. Angular provides these two functions to achieve the event propagation in a hierarchical […]
AngularJSFront End DevelopmentNode.js
$resouce is a perfect option to create a single page application which involve CRUD operations.You don’t write your CRUD methods (create,read,update and delete) when you use it. A RESTful web service with one endpoint for a data type that does different things with that data type based on HTTP methods like GET, POST, PUT, DELETE, etc. So with a $resource […]
Recently I discovered that every directive in AngularJS has a priority score assigned to it. While the page is loaded the priority plays a very important role in setting the order of the execution of various directives in single DOM Element. The priority is used to sort the directives before their “compile” function gets called. […]