1

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' } } }) 
2
  • abstract: true is likely your issue. Take that off main and see what happens Commented Apr 19, 2015 at 18:48
  • wait,but the main was supposed to be abstract, I guess. Nonetheless, tried and still got the same exception. Commented Apr 19, 2015 at 18:51

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.