Malformed cookie error after binding Angular with MVC 5

I have an MVC5 project with which I use angular and get the following error:

Error: malformed URI sequence
oh/h.cookies@https://controlpanel.abc.com/bundles/controlPanelAngularv=c7IsPcEqfC9w7vlO0f2C635w9XFObG3zp4KjeFBEh-c1:1:18254
g@https://controlpanel.abc.com/bundles/controlPanelAngular?v=c7IsPcEqfC9w7vlO0f2C635w9XFObG3zp4KjeFBEh-c1:1:35522
k/s<@https://controlpanel.abc.com/bundles/controlPanelAngular?v=c7IsPcEqfC9w7vlO0f2C635w9XFObG3zp4KjeFBEh-c1:1:34445
de/u/h.promise.then/c@https://controlpanel.abc.com/bundles/controlPanelAngular?v=c7IsPcEqfC9w7vlO0f2C635w9XFObG3zp4KjeFBEh-c1:1:48272

This error occurs only when the website is deployed and is in production.

I think this has something to do with .net linking things, but I'm not sure.

My package looks like this:

bundles.Add(new ScriptBundle("~/bundles/controlPanelAngular").Include(
  "~/Scripts/angular/dist/angular.min.js",
  "~/Scripts/angular/dist/ui-bootstrap-angular.min.js",
  "~/Scripts/angular/dist/master.js"
));

master.js - ( grunt). , , . , . , google, , , angular " ", . inline (angular.module('module').controller('ctrl', ['$injector', function($injector)), .

decodeURIComponent, encodeURIComponent, angular, html5Mode, $location, cookie , , . , :

angular.module('core.service').factory('navigatorService', ['$window', function ($window) {
  return {
    redirect: function (newLocation) {
      $window.location.href = newLocation;
    }
  };
}]);

, URL. URL, . , , - , MVC url, @ViewBag , angular:

ng-init="init(@(ViewBag.categoryId));" 

, asp URL-, URL- .

factory:

<script type="text/javascript">
angular.module('core.service').factory('mvcRouterService', function () {
    return {
        getCategoryUrl: function () { return '@Url.Action("GetCategory", "Categories")'; }
    };
});
</script>

, url ajax.

:

angular.module('module').factory('genericAjax', ['$http', '$injector', function ($http, $injector) {
  var mvcRouterService = $injector.get('mvcRouterService');
    return {
      getCategory: function (categoryId) {
        var data = {
          categoryId: categoryId
        };
      return $http.post(mvcRouterService.getCategoryUrl(), data).then(function (result) {
        return result.data;
      });
    }
   };
 }]);

, , :

https://github.com/ivpusic/angular-cookie/issues/28

, .

, URL- @part on, ,

, , :

"Error: malformed URI sequence
Browser/self.cookies@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:4811:33
sendReq@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:8813:1
$http/serverRequest@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:8539:25
processQueue@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:12078:25
scheduleProcessQueue/<@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:12094:36
 $RootScopeProvider/this.$get</Scope.prototype.$eval@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:13278:25
$RootScopeProvider/this.$get</Scope.prototype.$digest@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:13090:37
$RootScopeProvider/this.$get</Scope.prototype.$apply@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:13382:33
bootstrapApply@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:1494:20
invoke@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:4101:17
bootstrap/doBootstrap@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:1493:25
bootstrap@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:1512:13
angularInit@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:1406:45
@https://controlpanel.abc.com/Scripts/angular/dist/angular.js:24416:9
+4
1

- , catch angular, , , . , malformed cookie - Google Analytics . , angular . _utmz cookie

https://developers.google.com/analytics/devguides/collection/analyticsjs/cookie-usage

+1

All Articles