Name different phases of the AngularJS Scope lifecycle.
Here, are different phases of AngularJS Scope lifecycle: Creation Model mutation Watcher registration Mutation observation Scope destruction
Here, are different phases of AngularJS Scope lifecycle: Creation Model mutation Watcher registration Mutation observation Scope destruction
The syntax of Factory is as follows: app.factory(‘serviceName’,function(){ return serviceObj;})
“$rootScope” is a scope that is created on the DOM (Document Object Model) element. An application can have only one $rootScope that shares, among other components. It has the ng-app…
BOM or Browser Object Model consists of history, object navigator, screen location, etc. It specifies the global browser objects like console, local storage, and window.
<!DOCTYPE html> <html> <head> <meta chrset="UTF 8"> <title>Event Registration</title> </head> <body> <script src="https://code.angularjs.org/1.6.9/angular.js"></script> <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> <h1> IT Notes</h1> <div ng-app="DemoApp" ng-controller="DemoController"> <input type="button" value="Hide Angular" ng-click="ShowHide()"/> <br><br><div ng-hide="IsVisible">Angular</div> </div> <script…
Some commonly used Angular Global API functions are: Angular.isString: It will return true only if the given reference is of type string. Angular.lowercase: It converts any string to lowercase Angular.uppercase: It converts any…
AngularJS components that can be injected as a dependency are: 1) value 2) factory 3) service 4) provider 5) constant
Service method in AngularJS helps you to define service and method to it. In the following example, we have injected a simple addition service, which adds two numbers. <! DOCTYPE…
You can use: $cookies.put() method to set the cookies. $cookies.get() method to get the cookies. $cookies.remove to remove cookies in AngularJS.
In Angular JS $routeProvider sets the URL configuration. It maps with the related ng-template or HTML page and attaches a controller with the same.