The syntax of Factory is as follows: app.factory(‘serviceName’,function(){ return serviceObj;}) Post navigation Explain “$rootScope” in AngularJS Name different phases of the AngularJS Scope lifecycle.