Suppose I have two tabs in my app, One is tab-one and another is tab-two now i want navigate from tab-one’s view(one.html) to tab tab-two’s view(two.html). I tried $state.go(), $location, $window.location but nothing works , I can navigate to any views successfully if all are under same tab even though the controllers are different, but navigation does not work if views belongs different tabs, following code shows states defined in app.js file
I don’t even really understand what you’re trying to do or why you’re doing it in an ancient thread about a totally different version of the framework, but there’s virtually never any reason to do direct DOM access in an Angular app, let alone using undocumented internal element IDs. If you have to grab an element, use @ViewChild.
Some security concerns are documented here. There are also futureproofing issues - by using only Angular, you ensure your app would work even on a platform that doesn’t allow direct DOM access (or even have a DOM). Also, it’s extremely brittle to rely on internal framework implementation details (like element IDs). They can change at any time without warning or notice, and all of a sudden your code breaks.
I wish I understood better what the problem of this thread actually was, in which case maybe I could suggest some other things to do with your code.
In any event, any time you feel the urge to even type the word document in an Ionic app, I would urge you to stop and look for a more idiomatic and solid way to achieve your core goal.