Hello,

I want to modernize a "legacy" server-side web app with AngularJS 1.3.14. 
Some links should point to new pages made with Angular, while the vast 
majority of existing links need to stay as they are. I also want to 
use html5Mode, but cannot find a good configuration for my use case:

$locationProvider.html5Mode(true);
This causes most links on the site to stop working, except configured 
routes. I know that <a target="_self"...> avoids the "click hijacking", but 
the size of the application makes this approach infeasible.

$locationProvider.html5Mode({enabled : true, rewriteLinks : false});
This makes the old links reload the page again, but breaks the links to new 
pages. Switching to another route with $location.path("/new") does not work 
in this mode.

So I guess I want to apply the html5 mode "click hijacking" more 
selectively, i.e. programmatically with a custom function or maybe only in 
a subpath like "/myapp/new" or maybe even use a special directive for all 
new links. But I am out of ideas right now.

I'd appreciate <http://www.dict.cc/englisch-deutsch/appreciate.html> any 
hint, especially if anyone can share his/her experiences with integrating 
Angular into an existing web app.

Thanks,
Stefan

P.S.: <base> tag is set to the root of the web application.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to