您好我的代码似乎很好,但我不知道它为什么不起作用
app.js
var app = angular.module('MyApp', ['ngResource', 'ngRoute']);
app.config(function($routeProvider){
$routeProvider
.when('/',{
templateUrl: '../pages/index1.html'
}).when('/profile',{
templateUrl: '../pages/profile.html',
}).otherwise('',{templateUrl:'index.html'});
});
的index.html
<li><a data-ng-href="#/profile.html">Profile</a>