I have a clean AngularJS 1.2.8 application that I am just starting. Routing does not work on IE 8, but it works on any other browser (including IE 9). There are no errors in the console. Angular just does not start the route.
Can someone point me in the right direction? I have already reviewed the Angular IE 8 document and have not given any guidance.
HTML ...
<!doctype html> <html id="ng-app" data-ng-app="app"> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta charset="utf-8"> <title>Learning Content Portal</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/main.css"> </head> <body> <div class="container"> <div data-ng-view></div> </div> <script src="js/vendor/jquery-1.10.1.min.js"></script> <script src="js/vendor/json3.min.js"></script> <script src="js/vendor/bootstrap.min.js"></script> <script src="js/vendor/angular/angular.min.js"></script> <script src="js/vendor/angular/angular-route.min.js"></script> <script src="js/app.js"></script> </body> </html>
And app.js ...
var app = angular.module('app', ['ngRoute']); app.config(function ($routeProvider) { $routeProvider .when('/searchCourses', { templateUrl: 'partials/searchCourses.html', controller: 'controller_searchCourses' }) .when('/editCourse', { templateUrl: 'partials/editCourse.html', controller: 'editCourseController' }) .otherwise({ redirectTo: '/searchCourses' }); }); app.controller('controller_searchCourses', function ($scope) { alert('test'); });
Itβs also partial there, but I donβt think it is important because it never fires a warning (or loads a partial one).
<div class="container"> <div> Course Count: {{courses.length}} <ul> <li data-ng-repeat="course in courses | orderBy:course.name">{{ course.name }}</li> </ul> </div> <br /> <div> Name: <input type="text" data-ng-model="newCourse.name" /><br /> Owner: <input type="text" data-ng-model="newCourse.owner" /><br /> Code: <input type="text" data-ng-model="newCourse.code" /><br /> Status: <input type="text" data-ng-model="newCourse.status" /><br /> <br /> <button class="btn btn-default" data-ng-click="addCourse()">Add New Course</button> </div> </div>
source share