As you are aware that Angular rewrites the url and hence I have given the following code to take care, FYI I am not using the route provider in Angular.
I have already resolved the issue raised by Phil using $locationProvider.html5Mode
'use strict';
(function () {
angular.module('ngDocument', ['ngAnimate', 'ngSanitize', 'ui.bootstrap'])
})();
angular
.module('ngDocument')
.config(configState);
function configState($locationProvider) {
if (window.history && window.history.pushState) {
$locationProvider.html5Mode({
enabled: true,
requireBase: false,
rewriteLinks: false
}).hashPrefix('*');;
}
else {
$locationProvider.html5Mode(false);
}
}
///#source 1 1 /App/Services/sq-service.js
angular.module('ngDocument')
.service('sqService', ['$http', function ($http) {
// Service Code -- This comeplete code is not hitting when you go to this URL
}]);
///#source 1 1 /App/Services/sq-controller.js
angular.module('ngDocument')
.controller('sqWidgetInternetController', ['$scope', '$rootScope', '$http', 'sqService', function ($scope, $rootScope, $http, sqService) {
// Comeplete Contrller Code ---- This comeplete code is not hitting when you go to this URL
}]);
Now my issue is: the following url
http://localhost:62395/#tv?mobile=1
is rewritten to:
http://localhost:62395/#tv%3Fmobile=`enter code here`1
Am I missing something here or in the code?