InterviewSolution
Saved Bookmarks
| 1. |
What is the difference between factory and service in AngularJS? |
||||||||||
Answer»
Example of a Factory in Angular app.controller('myFactoryCtrl', FUNCTION ($scope, myFactory) { app.factory('myFactory', function () { service.getArtist = function () { return service; Example of a Service in Angular app.controller('myServiceCtrl', function ($scope, myService) { app.service('myService', function () { |
|||||||||||