I have this rule in my web.config that looks like this:
<rule name="netball.html" stopProcessing="true">
<match url="netball.html" />
<action type="Redirect" url="/netball" redirectType="Permanent" />
</rule>
but I have a route in angular setup like this:
.state('netball', {
url: '/netball',
templateUrl: '/assets/tpl/sports/netball.html',
controller: 'SportsController',
controllerAs: 'controller',
data: {
pageTitle: 'Netball'
}
})
For some reason the redirect rule is messing with my route. If I remove that rule, the netball view works fine. If I add it in, doesn't work at all (shows the index page, but the ui-view is empty like it can't find the template.
Because of this, I decided to change the templateUrl to
templateUrl: '/assets/tpl/sports/test.html',
and that works. So, there is something going on with angularJS and how it displays the view. Is there anything I can do (apart from renaming all my views to something that won't get matched by a redirect rule) to stop this happening?