AngularJS UI router handling 404s

前端 未结 6 1599
粉色の甜心
粉色の甜心 2020-12-03 01:48

I have an app with a service which wraps my API calls:

var ConcernService = {
    ...
    get: function (items_url, objId) {
        var defer = $q.defer();
         


        
6条回答
  •  臣服心动
    2020-12-03 02:33

    You can also try something like this and see if it works for you. You may need to adjust to your needs:

    .state('otherwise', {
        abstract: true,
        templateUrl: 'views/404.html'
    })
    .state('otherwise.404', {
        url: '*path',
        templateUrl: 'views/404.html'
    })
    

提交回复
热议问题