相关疑难解决方法(0)

使用ui-router显示404错误页面时如何更改URL

我想显示404错误页面,但我也想在位置保存错误的网址.

如果我会做那样的事情:

$urlRouterProvider.otherwise('404');
$stateProvider
    .state('404', {
        url: '/404',
        template: error404Template
    });
Run Code Online (Sandbox Code Playgroud)

网址将更改为/404.如何在不更改实际网址的情况下在错误的网址上显示错误消息?

angularjs angular-ui-router

17
推荐指数
2
解决办法
1万
查看次数

如何在angular.js中实现自定义路由?

我有一条路线:

.state('home.blog', {
  url: "/blog",
  templateUrl: "blog.html",
  controller: "BlogController"
})
Run Code Online (Sandbox Code Playgroud)

我的路线是localhost:3000/home/blog我想改变它localhost:3000/blog.我搜索了互联网,但我没有找到任何简单的解决方案.

state angularjs angular-ui-router

1
推荐指数
1
解决办法
880
查看次数

标签 统计

angular-ui-router ×2

angularjs ×2

state ×1