Get url path without querystring using AngularJS in ASP.Net

Last Reply on Jun 22, 2016 02:06 AM By aspcsharp

Posted on Jun 15, 2016 06:35 AM


When try get url path (home.html or page.html) with

var url = $location.path();

on my current path in browser add this #/home.html

and url look this: http://localhost:12241/home.html#/home.html

i want only http://localhost:12241/home.html

What is this, how solve this?

You are viewing reply posted by: aspcsharp on Jun 22, 2016 02:06 AM.
Posted on Jun 22, 2016 02:06 AM

Tnx Shashikant bit I don't see answer on above link.


I'm use standard code:


var path = window.location.pathname;
var page = path.split("/").pop();