Removing # from url in Angularjs while having .run in routes

后端 未结 7 650
感情败类
感情败类 2020-11-27 07:02

Here is my app.js route file in AngularJS

var app = angular.module(\'myApp\', [\'ngRoute\', \'ngAnimate\', \'toaster\']);
app.config([\'$routeP         


        
7条回答
  •  感情败类
    2020-11-27 07:29

    With html5mode you have to specify the base url in your html file for eg,

    
    

    Some links you can go through for your reference,

    https://docs.angularjs.org/error/$location/nobase

    https://scotch.io/quick-tips/pretty-urls-in-angularjs-removing-the-hashtag

提交回复
热议问题