在下面的链接中,我的应用程序存在一些路由问题,但我无法弄清楚为什么会发生这种情况。我正在使用 Node.js 来配置 http-server。
当我尝试访问localhost:8080/#home时,没有任何反应。
但是,当我配置“重定向到”时,应用程序会在如下链接中打开:"...:8080/#home!#home"
https://github.com/tvbuosi/AngularJS
angular.module('meuModulo',['ngRoute'])
.config(function($routeProvider){
$routeProvider
.when('/home', {
templateUrl: 'templates/home.html',
controller: 'indexController'
})
.when('/contato', {
templateUrl: 'templates/contato.html'
})
.otherwise({
redirectTo: '/home'
});
});