I am using ui-router and I have a setup like this

In app.js I have the following

      .state('TechReadiness', {
          url: "/Dashboard/TechReadiness",
          templateUrl: "/partials/TechnicalReadinessReport.aspx"
    .state('TechReadiness.details', {
        url: "/ReadinessDetails/:a/:b",
        templateUrl: function ($stateParams) {
            return "/partials/TechReadinessDetails.aspx?b=" + $stateParams.b + '&a=' + $stateParams.a;

There is a page and on that page I am creating the links as shown below

$("#Chart5ImageMap area").each(function () {
                var vHref = $(this).attr('href');
                var arg1 = vHref.substring(vHref.indexOf("'") + 1, vHref.indexOf(",") - 1);
                var arg2 = vHref.substring(vHref.indexOf(",") + 2, vHref.lastIndexOf("'"));
                var a = arg2.split(',');
                $(this).attr('href', '#/Dashboard/TechReadiness/ReadinessDetails/' + a[0] +'/'+a[1]);

This changes all the click postback events(asp.net Chart Control) to simple links. Now the problem is that whenever I click the link the url gets updated correctly but the corresponding view doesn't get loaded.

for example: If I click the link with a=parameter1,b=parameter2

url becomes http://localhost:63893/#/Dashboard/TechReadiness/ReadinessDetails/parameter1/parameter2

accordingly and the correct view is loaded

but on when I click links with


the url changes to http://localhost:63893/#/Dashboard/TechReadiness/ReadinessDetails/parameter2/parameter2

but the content in the view doenst change

Related posts

Recent Viewed