Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. (function() {
  2. 'use strict';
  3.  
  4. angular.module('myapp', [
  5. 'constants',
  6. 'ngMaterial',
  7. 'ngCordova',
  8. 'ngStorage',
  9. 'relativeDate',
  10. 'ui.router',
  11. 'myapp.services.myservice'
  12. ])
  13.  
  14. angular.module('constants', [])
  15.  
  16. .constant('appName', 'mynewapp');
  17.  
  18. (function() {
  19. 'use strict';
  20.  
  21. angular.module('myapp.services.myservice', [])
  22.  
  23. .factory('Myservice', function ($http, appName) {
  24. console.log(appName); //works great!
  25.  
  26. (function() {
  27. 'use strict';
  28.  
  29. angular.module('myapp')
  30. .controller('MyController', [
  31. '$cordovaOauth',
  32. '$state',
  33. '$rootScope',
  34. 'Myservice',
  35. MyController
  36. ]);
  37.  
  38. function MyController($cordovaOauth, $state, $rootScope, Myservice, appName ) {
  39. console.log(appName); //undefined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement