Today I am doing ui-router, trying to better understand forests in ionics, and one thing I noticed is that they give an abstract state to the "tabs" of the URL.
The only times I have ever used abstract states, I used an empty string as a URL, and I notice that if I ever accidentally tried to go to an abstract state (as opposed to a child state), I get Error:
Cannot go to abstract state '[insertAbstractStateHere]'
edit:
"In addition, when experimenting, when I try to assign a url to my abstract state (outside of Ionic) and still produce nested state representations, I get a large goose egg. Nothing appears at all."
the above quote is incorrect! I tried again in Plunker , and the nested states really appeared.
angular.module('routingExperiments', ['ui.router']) .config(function($urlRouterProvider, $stateProvider) { $stateProvider .state('abstractExperiment', { abstract: true, url: '', //<--- seems as if any string can go here. templateUrl: 'abstractExperiment.html' }) .state('abstractExperiment.test1', { url: '/test1', templateUrl: 'abstractTest1.html' }); });
Apparently, I really did it wrong. So my new question is:
Is there a reason why you can use a named state rather than an empty string when using abstract states, or is it just a style choice?
angularjs abstract state angular-ui-router ionic-framework
spb Oct 17 '15 at 0:50 2015-10-17 00:50
source share