Bug: $stage.go to tabbed view

#1

Hi there… Just to let the developers know that there’s a bug that popped up on Creator yesterday…

When you try to go to a tabbed view (in my case tabscontroller.MenSemanal), the console throws an exception:
Error: Could not resolve ‘tabsController.menSemanal’ from state ‘login’

This is a bug, since nothing in my code changed and just yesterday the $state.go function stopped working…

Hopefully it can be solved quickly, since i’ve had to resort to other workarounds which only KIND-OF work

Jose

#2

So… With some helpful messages with Zach I was able to isolate the problem… And the result is:
Don’t use special characters in Page Names
(which then become the sref of the page). When you do that, it becomes messy. Loose the accented / special characters and you’ll be fine…

Another thing popped up, about Creator SOMETIMES (it appeared random at first) appending _tab1 _tab2 to the name of pages that live inside of a tab… By private message Zach told me the reasoning, so I’m posting it here for someone to maybe find useful someday in the future (they told me they’ll update the docs – you know, documentation haha)

If a page is linked to from the tabs controller, or from a child of the tabs controller, its sref will automatically get “tabsController” (or whatever is the sref of the tabs controller) appended to it, e.g. tabsController.page.
If the page is linked to from multiple tabs it will get multiple srefs, e.g. tabsController.page_tab1, tabsController.page_tab2, as well as just tabsController.page. When routing to a page, which one of these you choose will determine which tab is highlighted when you route to the page. If you choose the sref that doesn’t specify a tab, the currently selected tab will remain highlighted.
So the reason you’re seeing a page’s sref options change is likely because you’re changing the way the pages are linked together. If you remove a link from tab2 or a child of tab 2, for example, the other options will disappear and you’ll be back to just tabsController.page.
Now, regarding this error: "Could not resolve ‘tabsController.menSemanal’ from state ‘login’"
Most likely what’s happening there is you’re using the “open in current tab” sref, but you’re routing from a page that doesn’t have a current tab. Basically, if you’ve got multiple srefs for a page and you’re linking from a page that isn’t in part of the tabs controller, you’ll need to specify a tab in the sref, e.g. tabsController.page_tab1.