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

Hi,

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