I'm beginner to Angular 4, I have issue with trailing slash in ng-2 ui-router-2.
when i hit this url, its works fine
but by adding / at end, it does not display page
I searched it, but found solution for ui-router 1, one of solution was to use
$urlMatcherFactoryProvider.strictMode(false);
and some one said to add rule like this
$urlRouterProvider.rule(function($injector, $location) {
var path = $location.path();
var hasTrailingSlash = path[path.length-1] === '/';
if(hasTrailingSlash) {
//if last charcter is a slash, return the same url without the slash
var newPath = path.substr(0, path.length - 1);
return newPath;
}});
How i will do this in Angular 4 using ng2 ui-router-2??