<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>$interval</title>
<script type="text/javascript" src="js/angular.js" ></script>
<script>
$scope.time=new Date().toLocaleTimeString();
$interval(function(){
$scope.time=new Da
<html>
<head>
<meta charset="UTF-8">
<title>$interval</title>
<script type="text/javascript" src="js/angular.js" ></script>
<script>
var app=angular.module("myApp",[]);
//$interval:设置定时器
app.controller("myCtrl",function($scope,$interval){$scope.time=new Date().toLocaleTimeString();
$interval(function(){
$scope.time=new Da