0

I was working on angular js implementation in ASP.NET MVC3 application.

I have loaded my products using

var deferred = $q.defer();
        // Initiates the AJAX call
        $http({ method: 'Get', url: scope.url ,params: {categoryId: scope.categoryId,pageIndex:scope.pageIndex,brandId:scope.brandString,orderBy:scope.orderBy} }).success(deferred.resolve).error(deferred.reject);
        // Returns the promise - Contains result once request completes
        return deferred.promise;

Everything is happening properly. After getting products I am updating my url hash so that page is identified by hash parameters. Somehow after updating hash IE is reloading my page and removed hash tag from my url.

I am changing the hash as

location.hash = 'pagenumber=' + ($scope.pageIndex+1) + ',orderby=' + $scope.orderBy + ',brandid=' + $scope.brandString;

My url looks like

mysite.net/#/pagenumber=1,orderby=20,brandid=8:104

Anybody knows workaround for this.

Nitin Varpe
  • 10,450
  • 6
  • 36
  • 60

0 Answers0