Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

on an Ionic-angular application, I'm calling:

   $state.go("main.crudlist");

and having the following exception in response:

Error: Could not resolve 'entry' from state 'main'
    at Object.transitionTo (angular-ui-router.min.js:3074)
    at Object.go (angular-ui-router.min.js:3007)
    at angular-ui-router.min.js:4057
    at angular.min.js:138
    at e (angular.min.js:40)
    at angular.min.js:44

What's that entry supposed to mean?

Here's the state declaration:

$stateProvider .state('login', { url: '/login', templateUrl: 'Content/Mobile/templates/login.html', controller: 'LoginController' })

    .state('settings', {
        url: '/settings',
        templateUrl: 'Content/Mobile/templates/settings.html',
        controller: 'SettingsController'
    })

    // setup an abstract state for the tabs directive
      .state('main', {
          url: "/main",
          templateUrl: "Content/Mobile/templates/main.html",
          abstract: true,
          controller: 'MainController'
      })


    .state('main.home', {
        url: '/home',
        views: {
            'main': {
                templateUrl: 'Content/Mobile/templates/home.html',
                controller: 'HomeController'
            }
        }
    })


   .state('main.settings', {
       url: '/settings',
       views: {
           'main': {
               templateUrl: 'Content/Mobile/templates/settings.html',
               controller: 'SettingsController'
           }
       }
   })

.state('main.crudlist', {
    url: "/crudlist",
    views: {
        'main': {
            templateUrl: "Content/Mobile/templates/crudlist.html",
            controller: 'CrudListController'
        }
    }
})
share|improve this question
    
abstract: true is likely your issue. Take that off main and see what happens – scniro Apr 19 '15 at 18:48
    
wait,but the main was supposed to be abstract, I guess. Nonetheless, tried and still got the same exception. – Luiz Rolim Apr 19 '15 at 18:51
up vote 1 down vote accepted

In the end,it had nothing to do to angular,but to the ionic html declaration itself.

I had:

<a ui-sref="entry" class="item" ng-repeat="leaf in menuleafs()" ng-click="loadApplication(leaf)">{{leaf.title}}</a>

Switching it to:

<a class="item" ng-repeat="leaf in menuleafs()" ng-click="loadApplication(leaf)">{{leaf.title}}</a>

Did the trick.

Sorry I didn't provide enough info

share|improve this answer
    
Don't forget you can accept your own answer :) – contrebis Sep 25 '15 at 12:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.