Get url path without querystring using AngularJS in ASP.Net

Last Reply one year ago By aspcsharp

Posted one year ago


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?

Posted one year ago

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();


I agree, here is the link: