I am trying to build simple routing app in angularjs. I have main index.html page with ng-view div and javascript code for routing. Also 2 simple html pages view2.html and view3.html placed in sub folder partials1. I am getting below error. Please help.
Error: Access is denied. Error: [$compile:tpload] Failed to load template: partials1/view3.html http://errors.angularjs.org/1.3.15/$compile/tpload?p0=partials1%2Fview3.html
index.html:
<div data-ng-view></div> <script src="angular.js"></script> <script src="angular-route.js"></script> <script type="text/javascript"> var demoApp = angular.module('demoApp', [ 'ngRoute' ]); demoApp.controller('SimpleController', function($scope) { $scope.customers = [ { name : 'Jon Smith1', city : 'Charlotte' }, { name : 'John Doe', city : 'New York' }, { name : 'Jane Doe', city : 'Jacksonville' } ]; }); demoApp.config([ '$routeProvider', function($routeProvider) { $routeProvider.when('/view1', { templateUrl : 'partials1/view3.html', controller : 'SimpleController' }).when('/view2', { templateUrl : 'partials1/view2.html', controller : 'SimpleController' }).otherwise({ redirectTo : '/view1' }); } ]); </script>
view2.html
<div class="container">33333333333333</div>
view3.html
<div class="container">33333333333333</div>