I've be fiddling around with ui-router today in trying to better understand the scaffolding in Ionic and one thing that I noticed was that they give the abstracted state of "tabs" a url.
The only times I've ever used abstract states, I used an empty string as the url and I notice that if I've ever accidentally attempted to navigate to an abstracted state (as opposed to the child state) I get the error:
Cannot transition to abstract state '[insertAbstractStateHere]'
edit:
"Moreover, in experimenting, when I try to assign a url to my abstract state (outside of Ionic) and still render the nested state views, I get a big goose egg. Nothing shows up at all."
the above quoted statement is false! I tried it again in Plunker and the nested states did show up.
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 was indeed doing it wrong. So my new question is:
Is there any reason why one would use a named state as opposed to an empty string in employing abstract states, or is it just a style choice?