我试图理解为什么当我点击此列表项时,它不想转到相应的页面。相反,它会恢复到主页面。
<li ng-click="goToPage('#/show-schedule')">Schedule</li>
angular
.module('CaliforniaJam', [
'ngAnimate',
'ngCookies',
'ngResource',
'ngRoute',
'ngSanitize',
'ngTouch',
'ngFileUpload',
'simplePagination',
'ui.bootstrap',
'ngTouch',
//'mobile-angular-ui'
])
.config(function ($routeProvider) {
$routeProvider
.when('/show-schedule', {
templateUrl: 'views/show-schedule.html',
controller: 'ShowScheduleCtrl',
controllerAs: 'ShowScheduleCtrl'
.otherwise({
redirectTo: '/'
});
});
$scope.goToPage = function(url) {
$rootScope.transition('slide', 'left', url);
}