-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I don't see an alert or a console message. I have verified that the library is being loaded along with angular.
app.js:
var myApp = angular.module("myApp", [
'ngRoute',
'routeScripts',
'loginModule',
'dashboardModule'
]);
myApp.config(['$routeProvider', '$locationProvider',
function($routeProvider, $locationProvider){
checkLoggedIn =
$routeProvider.
when('/login', {
templateUrl: 'views/login.html',
controller: 'LoginController',
js: 'login-includes.js'
}).
when('/dashboard', {
templateUrl: 'views/dashboard.html',
controller: 'DashboardController',
js: 'dashboard-includes.js'
}).
otherwise({
redirectTo: '/login'
});
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
}]);
index.html:
...
<html lang="en" ng-app="myApp">
...
<script type="text/javascript" src="vendor/angular.js/"></script>
<script type="text/javascript" src="vendor/angular-route.js/"></script>
<script type="text/javascript" src="vendor/route-scripts.js/"></script>
</body>
js/login-includes.js:
$(function(){
console.log("hello!");
alert("hello!");
});
File Structure:
dist
js
dashboard-includes.js
login-includes.js
dashboard.js // <-- the dashboard controller
login.js // <-- the login controller
app.js
index.html
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels