Basic app service you can extend, that contains code to handle common events like resize, orientationchange, onscroll and much more.
bower install angular-basic-app-service --save
Reference the module in your app.
(function() {
angular
.module( 'someApp', [
'angular.basicAppService'
] );
})();
Create your AppService by extending the BasicAppService
(function() {
angular
.module( 'someApp' )
.factory( 'AppService', serviceDefinition );
serviceDefinition.$inject = [ 'BasicAppService' ];
function serviceDefinition( BasicAppService ) {
var service = angular.copy( BasicAppService );
service.someOtherMethod = function() {
// your code
};
return service;
}
})();
1.0.0
- First stable release of angular-basic-app-service.