I've been trying to render certain template related to a state and component according to this article
In my project running under dev-server it all works fine and when I execute $state.go("home")
the component template is loaded how I expect but when I do this in a testing environment, this doesn't work.
Before, in testing, when I use the "old way" using "template" instead "component" with ui-router, execute $rootScope.$digest()
was enough for add the template inside the <div ui-view></div>
but using this new way this doesn't work anymore.
What am I doing wrong?
Edit: I've been trying to deeply understand the problem and I see that the problem is related to the HTTP request that was done. Maybe it's related to the way that my promise resolves on the resolve callback using async/await. Please check the Service:
Service
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…