<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript" src="js/angular.js" ></script>
<script>
var app = angular.module("myapp",[]);
var ss = app.controller("mycontr",function($scope,$location,$timeout,$interval,$http){
$scope.myurl = $location.absUrl();
$scope.ahost = $location.host();
$scope.bprotocol = $location.protocol();
$scope.cpath = $location.path();
$scope.dport = $location.port();
$scope.str="";
$timeout(function(){
$scope.str="2秒";
},2000);
$scope.currentTime="";
$interval(function(){
var _dater = new Date().toLocaleTimeString();
$scope.currentTime=_dater;
});
$http({
method:"get",
url:"http://result.eolinker.com/pWEDzFn48fd146c3a725c1571f997a44281b94d1201b661?uri=myjson1"
}).then(function success(response){
$scope.jsonFromNet = response.data;
},function error(response){
});
$scope.deleteG = function($index){
$scope.jsonFromNet.data.splice($index,1);
}
});
</script>
</head>
<body ng-app="myapp" ng-controller="mycontr" >
<p>{{str}}</p>
<p>{{currentTime}}</p>
<table>
<tr>
<td>序号</td>
<td>id</td>
<td>iten</td>
<td>title</td>
<td>img</td>
<td>操作</td>
</tr>
<tr ng-repeat="g in jsonFromNet.data">
<td>{{$index}}</td>
<td>{{g.detectionId}}</td>
<td>{{g.detectionItem}}</td>
<td>{{g.categoryTitle | limitTo:6}}</td>
<td><img src="http://www.sinaimg.cn/ty/deco/2013/1108/nbalogo/20.png" /></td>
<td><input type="button" ng-click="deleteG($index);" value="删除" /></td>
</tr>
</table>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript" src="js/angular.js" ></script>
<script>
var app = angular.module("myapp",[]);
var ss = app.controller("mycontr",function($scope,$location,$timeout,$interval,$http){
$scope.myurl = $location.absUrl();
$scope.ahost = $location.host();
$scope.bprotocol = $location.protocol();
$scope.cpath = $location.path();
$scope.dport = $location.port();
$scope.str="";
$timeout(function(){
$scope.str="2秒";
},2000);
$scope.currentTime="";
$interval(function(){
var _dater = new Date().toLocaleTimeString();
$scope.currentTime=_dater;
});
$http({
method:"get",
url:"http://result.eolinker.com/pWEDzFn48fd146c3a725c1571f997a44281b94d1201b661?uri=myjson1"
}).then(function success(response){
$scope.jsonFromNet = response.data;
},function error(response){
});
$scope.deleteG = function($index){
$scope.jsonFromNet.data.splice($index,1);
}
});
</script>
</head>
<body ng-app="myapp" ng-controller="mycontr" >
<p>{{str}}</p>
<p>{{currentTime}}</p>
<table>
<tr>
<td>序号</td>
<td>id</td>
<td>iten</td>
<td>title</td>
<td>img</td>
<td>操作</td>
</tr>
<tr ng-repeat="g in jsonFromNet.data">
<td>{{$index}}</td>
<td>{{g.detectionId}}</td>
<td>{{g.detectionItem}}</td>
<td>{{g.categoryTitle | limitTo:6}}</td>
<td><img src="http://www.sinaimg.cn/ty/deco/2013/1108/nbalogo/20.png" /></td>
<td><input type="button" ng-click="deleteG($index);" value="删除" /></td>
</tr>
</table>
</body>
</html>