I know this is probably a non angular way of doing things but I can't think of a good way without having to rewrite a lot of how the content is laid out. This is also my first angular app and it's been a pleasure to learn the quirks.
Basically, I am writing a mobile version of a website that is radically different which didn't justify rewriting the website so it's dynamic. So we've decided to write an API that returns content from each of these pages in the form of HTML.
I have a working proof of concept written in Angular that does a $http request to grab the data, and that works perfectly. However, in each of these pages there could be one or many links, and those links need to be parsed and modified so the page calls the API instead of browsing there directly.
For example, an about us link could have the following mockup returned from the API (through $http.get().success():
<a href="http://localhost/about-us/">About Us</a>
The pages don't have an ID, we're working with a framework that doesn't have IDs for pages.
But I need to transform this over to, so Angular knows the load the page via an ajax get.
<a href="#" ng-click="loadPage('about-us')">About Us</a>
Is there a way of doing this?
Thank you !