Category: AngularJs

Lazy Loading With AngularJS

HTML Scripts Download and include lazy-loader.min.js.

Example of Creating Basic Factory and Service in AngularJS

[code] mainApp2.factory(‘MathService’, function() { var factory = {}; factory.multiply = function(a, b) { return a * b; }; return factory; }); mainApp2.service(‘CalcService’, function(MathServic){ this.square = function(a) { return MathService.multiply(a,a); }; }); mainApp2.controller(‘CalcController’, function($scope, CalcService)...