我想显示404错误页面,但我也想在位置保存错误的网址.
如果我会做那样的事情:
$urlRouterProvider.otherwise('404');
$stateProvider
.state('404', {
url: '/404',
template: error404Template
});
Run Code Online (Sandbox Code Playgroud)
网址将更改为/404.如何在不更改实际网址的情况下在错误的网址上显示错误消息?
我有一条路线:
.state('home.blog', {
url: "/blog",
templateUrl: "blog.html",
controller: "BlogController"
})
Run Code Online (Sandbox Code Playgroud)
我的路线是localhost:3000/home/blog我想改变它localhost:3000/blog.我搜索了互联网,但我没有找到任何简单的解决方案.