Skip to content

Instantly share code, notes, and snippets.

@petebacondarwin
Last active December 11, 2015 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petebacondarwin/4556147 to your computer and use it in GitHub Desktop.
Save petebacondarwin/4556147 to your computer and use it in GitHub Desktop.
angular.module('onlineModule',[]).factory('dataService', { ... });
angular.module('offlineModule',[]).factory('dataService', { ... });
var app = angular.module('myApp', ['onlineModule']); // onlineModule or offlineModule
app.service('x', function (dataService) { // $dataService could be onlineModule.dataService or offlineModule.dataService
// online or offline? we don't care!
});
app.service('y', function (dataService) {
// online or offline? we don't care!
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment