阅读背景:

从url angularjs中删除#符号后,Url刷新并重新加载

来源:互联网 

My app.js

app.config(['$routeProvider','$locationProvider', function($routeProvider,$locationProvider) {
    $routeProvider.
    when('/', {
        templateUrl: 'interests.html',
        controller: 'InterestsController'
    })
    .when('/interests',{
        templateUrl: 'interests.html',
        controller: 'InterestsController'
    })
    .when('/subjects',{
        templateUrl: 'subjects.html',
        controller: 'SubjectsController'
    })
    .when('/prequalification',{
        templateUrl: 'prequalification.html',
        controller: 'PreQualificationController'
    })
    .when('/qualification',{
        templateUrl: 'qualification.html',
        controller: 'QualificationController'
    })
    .when('/personalinfo',{
        templateUrl: 'personalinfo.html',
        controller: 'PersonalInfoController'
    })
    .otherwise({
        redirectTo : '/interests'
    });
    if(window.history && window.history.pushState){
        $locationProvider.html5Mode(true);
    }
}]);
app.config(['$routeProvider'



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: