某项目前端部分,需要获取当前url,在AngularJS中找方法。
使用$location服务:
//url: http://localhost/kd-datacenter/report/day/SNXN
//使用$location
if($location.absUrl().indexOf("day") > -1){
//...
}
某项目前端部分,需要获取当前url,在AngularJS中找方法。
使用$location服务:
//url: http://localhost/kd-datacenter/report/day/SNXN
//使用$location
if($location.absUrl().indexOf("day") > -1){
//...
}