Unsafe added to link using ng-href

1,211 views
Skip to first unread message

Robin

unread,
Apr 16, 2013, 6:04:44 AM4/16/13
to ang...@googlegroups.com
When using ng-href to create an url that is relative to the the current path (ie. "groups/1/"), it adds "unsafe:" in IE7. Any way to fix this? It works fine in all other browsers as far as I've seen..

A solution would be greatly appreciated!

Robin

unread,
Apr 16, 2013, 7:42:41 AM4/16/13
to ang...@googlegroups.com
So I found out that IE7 handles the href tag differently. Instead of returning the absolute URL it returns the relative (ie.  "groups/1/", instead of http://whatever.com/groups/1/").

Is there any possible way to fix this?

Patrick Stoica

unread,
Jun 10, 2013, 4:40:52 PM6/10/13
to ang...@googlegroups.com
Hey Robin, have you ever figured out a solution?

Robin Franken

unread,
Jun 11, 2013, 2:17:57 AM6/11/13
to ang...@googlegroups.com
The only solution I have is to not use HTML5 mode and use the url like: "#/groups/1/". That way it works in every browser.


--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/7q-0HJVlgEY/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Patrick Stoica

unread,
Jun 11, 2013, 10:16:18 AM6/11/13
to ang...@googlegroups.com
Weird, I tried that. I could actually only get it to work using a normal href tag, and then HTML5 mode even worked with the appropriate fallbacks. But ng-href just wouldn't work on IE7 without turning it into an "unsafe:" link, regardless of routing mode.

Robin Franken

unread,
Jun 11, 2013, 10:18:56 AM6/11/13
to ang...@googlegroups.com
Ah yes, I forgot to mention that I do use the normal href tag.. For all the other element the ng tags (e.g ng-src) work just fine except for the 'a' element.
Reply all
Reply to author
Forward
0 new messages