Ionic 1 > ios > application root absolute path

this is about the ionic 1.

Earlier developer created a weird structure and did not use the routing utility!
He created widgets after widgets & nested them.
Now he is trying to put a menu that will appear on all of those various index.htmls of those various nested folders…

A big mess.

The menu is gonna look the same. Right now, he is trying to manage the links thru relative linking, since there is too many, he is frustrated. I suggested him to use abs path

He is trying to find out the full path to application root so he can use absolute paths in the menu! The good thing is we only need to worry about ios.

Is there a way to get to the ios app root for the current app so the links will always work no matter what folder sub level he is at?

At android, that root path was I think something like this:


I suggested him to do an alert(window.locaion.href) at the app root and do the test on ionic lab to see what iphone is gonna pop?

But, not sure if that’s gonna work… Is there a better way?