angularjs - How to detect url in Angular JS? -


i have chat in angular js. need open dialog window if user put url as: /chat/dialog/12

how can it?

use $location. $location.path() returns current url

var url = $location.path(); if(url==='/chat/dialog/12'){ //do code here } 

Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -