Angular Safari Route Param With Space Error
<p>My web app works fine on Chrome, Firefox, and IE and even on an iPad Safari browser but not on Safari Desktop - windows 7. See code below that triggers digest loop. This only happens when a space is in the route param e.g. if it contains "Test Name" instead of "TestName".</p>

<p>Error =  [$rootScope:infdig] 10 $digest() iterations reached. Aborting!</p>

<p>I am not an advanced angular programmer not sure if the was I am coding this 100% correctly. Any help appreciated. Thanks.</p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>  app.config(['$routeProvider', '$tooltipProvider', '$locationProvider', '$httpProvider',
  function($routeProvider, $tooltipProvider, $locationProvider, $httpProvider) {
    $httpProvider.useApplyAsync(true);

    var viewBase = '/app/views/';
    $tooltipProvider.options({
      placement: 'bottom',
      popupDelay: '1500'
    });

    $routeProvider
      .when('/', {
        templateUrl: viewBase + 'home.html',
        controller: 'homeController',
      })
      .when('/play/play/:quizName', {
        templateUrl: viewBase + 'quizplay/play.html',
        controller: 'quizPlayController',
        controllerAs: 'vm',
        caseInsensitiveMatch: true,
        resolve: {
          myData: ['crudService', '$route',
            function(crudService, $route) {
              var apiUrl = 'quizApi?quiznameforplay=' + $route.current.params.quizName;
              return crudService.get(apiUrl, '');
            }
          ]
        }
      })
      .otherwise({
        redirectTo: '/',
      });

    $locationProvider.html5Mode(true);
  }
  ]);
  })();


  (function() {
    'use strict';
    app.service('crudService', ['$http',
      function($http) {
        this.get = function(apiUrl, id) {
          if (id != "") apiUrl = apiUrl + "/" + id;

          var headers = {};
          headers.Authorization = 'Bearer ' + sessionStorage.tokenKey;
          var promise = $http({
            method: 'GET',
            url: "/api/" + apiUrl,
            headers: headers
          });
          promise.success(function(data) {
            return data;
          });
          return promise;
        }

        this.delete = function(apiUrl, id) {
          var headers = {};
          headers.Authorization = 'Bearer ' + sessionStorage.tokenKey;
          var request = $http({
            method: "delete",
            url: "/api/" + apiUrl + "/" + id,
            headers: headers
          });
          return request;
        }

        this.put = function(apiUrl, obj) {
          var headers = {};
          headers.Authorization = 'Bearer ' + sessionStorage.tokenKey;
          var request = $http({
            method: "put",
            url: "/api/" + apiUrl,
            contentType: 'application/json; charset=utf-8',
            data: JSON.stringify(obj),
            headers: headers
          });
          return request;
        }

        this.post = function(apiUrl, obj) {
          var headers = {};
          headers.Authorization = 'Bearer ' + sessionStorage.tokenKey;
          var request = $http({
            method: "post",
            url: "/api/" + apiUrl,
            contentType: 'application/json; charset=utf-8',
            data: JSON.stringify(obj),
            headers: headers
          });
          return request;
        }
      }
    ]);
  })();</code></pre>
</div>
</div>
</p>