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
Post a Comment