Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- 'use strict';
- angular.module('myapp', [
- 'constants',
- 'ngMaterial',
- 'ngCordova',
- 'ngStorage',
- 'relativeDate',
- 'ui.router',
- 'myapp.services.myservice'
- ])
- angular.module('constants', [])
- .constant('appName', 'mynewapp');
- (function() {
- 'use strict';
- angular.module('myapp.services.myservice', [])
- .factory('Myservice', function ($http, appName) {
- console.log(appName); //works great!
- (function() {
- 'use strict';
- angular.module('myapp')
- .controller('MyController', [
- '$cordovaOauth',
- '$state',
- '$rootScope',
- 'Myservice',
- MyController
- ]);
- function MyController($cordovaOauth, $state, $rootScope, Myservice, appName ) {
- console.log(appName); //undefined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement