<!-- 列出文件所在路径-->
<!DOCTYPE html>
<html lang="en" ng-app="myapp">
<head>
<meta charset="utf-8">
<script src="js/angular.js"></script>
</head>
<body>
<div ng-controller="myctrl">
{{myurl}}
</div>
</body>
<script type="text/javascript">
var app = angular.module("myapp",[]);
app.controller("myctrl",function($scope,$location){
$scope.myurl = $location.absUrl();
});
</script>
</html>
14-service之$location
最新推荐文章于 2017-08-01 18:39:43 发布