Visualforce App Using AngularJs
AngularJs Before look at code you should understand the angularJs factory function . In AngularJS, services are reusable singleton objects that are used to organize and share code across your app. They can be injected into controllers,filters,directives. AngularJS provides you three ways : service, factory and provider to create a service. Factory : A factory is simple function which allows you to add some logic before creating the object. It returns the created object. It is just a collection of functions like a class. Hence, it can be instantiated in different controllers when you are using it with constructor function. Syntax: app.factory('serviceName',function(){ return serviceObj;}) Creating service using factory method: <script> var app = angular.module( 'app' ,[]); app.factory(( 'myfactory' , function (){ var serviceobj={}; serviceobj.function1= function (){ // To Do: }; serviceobj.function2= function (){ // T...