However, when I try to integrate it, I get a white screen.
/* global app:true */
/* exported app */
'use strict';
/**
* @ngdoc overview
* @name WebAppApp
* @description
* # WebAppApp
*
* Main module of the application.
*/
var app = angular
.module('WebAppApp', [
'ngAnimate',
'ngAria',
'ngCookies',
'ngMessages',
'ngResource',
'ngRoute',
'ngSanitize',
'ngTouch',
'angularUtils.directives.dirPagination',
'ui.bootstrap',
'ng.httpLoader'
])
.config(function($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/login.html',
controller: 'loginCtrl',
// controllerAs: 'login'
})
.when('/home', {
controller: 'homeCtrl',
templateUrl: 'views/home.html',
resolve: {
"checkLoggedIn": function($location, $cookies, $rootScope) {
if (!$cookies.get('globals')) {
$location.path('/');
}
}
},
//controllerAs: 'home'
})
.when('/menteeMentors', {
controller: 'menteeMentorsCtrl',
templateUrl: 'views/listMentorsMentees.html',
resolve: {
"checkLoggedIn": function($location, $cookies, $rootScope) {
if (!$cookies.get('globals')) {
$location.path('/');
}
}
},
//controllerAs: 'home'
})
.when('/myGoals', {
controller: 'myGoalsCtrl',
templateUrl: 'views/myGoals.html',
resolve: {
"checkLoggedIn": function($location, $cookies, $rootScope) {
if (!$cookies.get('globals')) {
$location.path('/');
}
}
},
//controllerAs: 'home'
})
.when('/addGoal', {
controller: 'myGoalsCtrl',
templateUrl: 'views/addGoal.html',
resolve: {
"checkLoggedIn": function($location, $cookies, $rootScope) {
if (!$cookies.get('globals')) {
$location.path('/');
}
}
},
//controllerAs: 'home'
})
.when('/signup', {
templateUrl: 'views/signup.html',
controller: 'signupCtrl',
//controllerAs: 'home'
})
.otherwise({
redirectTo: '/'
});
//check browser support
if (window.history && window.history.pushState) {
//$locationProvider.html5Mode(true); will cause an error $location in HTML5 mode requires a tag to be present! Unless you set baseUrl tag after head tag like so: <head> <base href="/">
// to know more about setting base URL visit: https://docs.angularjs.org/error/$location/nobase
// if you don't wish to set base URL then use this
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
}
});
.config([
'httpMethodInterceptorProvider',
function(httpMethodInterceptorProvider) {
httpMethodInterceptorProvider.whitelistDomain('validate.jsontest.com');
httpMethodInterceptorProvider.whitelistDomain('github.com');
}
]);