angularjs - Sharing Angular.js links in html5 mode with IE9 -
we have angular.js application running in html 5 mode, , ie9 falls hashbang mode expected when navigating through app. however, if share/post links pages on our site, need links valid in ie9 when they're typed or pasted browser. works on pages.
our contact page works. if enter /base/contact in ie9, url automatically changes /base/#/contact , displays perfectly. interestingly, when link entered /base/contact/ not work.
most pages not work. instance, /base/dataset/data-registry should change in ie9 /base/#/dataset/data-registry not. url doesn't change, , page not functional.
here relevant routes:
$routeprovider .when('/dataset/:id', { templateurl: 'components/dataset/dataset.html', controller: 'datasetctrl' }) .when('/', { templateurl: 'components/home/home.html', controller: 'homectrl' }) .when('/contact', { templateurl: 'components/contact/contact.html', controller: 'contactctrl' }) .when('/article/:articleid', { templateurl: 'components/article/article.html', controller: 'articlectrl' }) .otherwise({ redirectto: '/' }) and in case server issue, here iis rules:
<rewrite> <rules> <rule name="dataset" stopprocessing="true"> <match url="^fir/dataset/*" /> <action type="rewrite" url="fir/index.html" /> </rule> <rule name="contact" stopprocessing="true"> <match url="^fir/contact/*" /> <action type="rewrite" url="fir/index.html" /> </rule> <rule name="article" stopprocessing="true"> <match url="^fir/article/*" /> <action type="rewrite" url="fir/index.html" /> </rule> <rule name="fir" stopprocessing="true"> <match url="^$" /> <action type="redirect" url="fir/" /> </rule> </rules> </rewrite> can explain why contact gets rewritten hash when pasted in ie9, others not?
Comments
Post a Comment