Open ashokkumar24 opened 8 years ago
'use strict'; require.config( {
baseUrl : "", paths : { "angular" : "client/assets/vendor/angular/angular.min", "angular-amd" : "client/assets/vendor/angularAMD/angularAMD.min", "ngload" : "client/assets/vendor/ng-load/ng-load", "ui-router" : "client/assets/vendor/angular-ui-router/release/angular-ui-router.min", "jquery" : "client/assets/vendor/jquery/dist/jquery.min", "bootstrap" : "client/assets/vendor/bootstrap/dist/js/bootstrap.min", "signupModule" : "client/signup/signup.application", "loginModule" : "client/login/login.application", "homeModule" : "client/home/home.application", "constant" : "client/core/constant" }, shim : { "angular-amd" : [ "angular" ], 'ngload' : [ 'angular-amd' ], "ui-router" : [ "angular"], "bootstrap" : [ 'jquery'] }, deps : [ 'app' ]
} );
define([ "angular-amd", 'jquery', 'bootstrap', "ui-router", "signupModule", "loginModule", "homeModule"
], function(angularAMD) { 'use strict'; var app = angular.module('app', [ "ui.router", "signup", "login", "home" ]); app.config([ '$stateProvider', '$urlRouterProvider', function( $stateProvider, $urlRouterProvider ) { $urlRouterProvider.otherwise( '/' ); //Route for home $stateProvider.state( "home", { url : '/', views : { '' : { templateUrl: 'client/main.html' }, 'nav@home' : { templateUrl : 'client/nav/view/nav.html', }, 'body@home' : { templateUrl : 'client/login/view/login.html', controller : 'loginCtrl as login' }, 'footer@home' : { templateUrl : 'client/signup/view/signup.html', controller : 'signupCtrl as signup', } }, controllerUrl : 'ngload!signupModule', }); //Home page route $stateProvider.state("welcome", { params: {'userObj': null}, url: '/welcome', templateUrl: 'client/home/view/home.html', controller: 'homeCtrl as home', resolve: { userObj: ['$stateParams', function($stateParams) { return $stateParams.userObj; }] }, controllerUrl: 'ngload!homeModule', }); } ]); return angularAMD.bootstrap( app );
});
I am getting Reference Error : Angular is not defined. Could you please help on this???
main.js
'use strict'; require.config( {
} );
App.js
define([
"angular-amd", 'jquery', 'bootstrap', "ui-router", "signupModule", "loginModule", "homeModule"
});
I am getting Reference Error : Angular is not defined. Could you please help on this???