13.angular时间
生活随笔
收集整理的這篇文章主要介紹了
13.angular时间
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
<!DOCTYPE html>
<html ng-app="myApp" ng-controller="myCtrl">
<head lang="en">
<meta charset="UTF-8">
<title>T38-angular時間</title>
<script src="js/angular.js" type="text/javascript"></script>
</head>
<body>
<p>{{theTime}}</p>
</body>
<script type="text/javascript">
var app = angular.module("myApp", []);
app.controller("myCtrl", function ($scope,$interval) {
$scope.theTime = new Date().toLocaleTimeString();
$interval(function () {
$scope.theTime = new Date().toLocaleTimeString();
},1000);
});
</script>
</html>
轉載于:https://www.cnblogs.com/mx2036/p/6704701.html
總結
以上是生活随笔為你收集整理的13.angular时间的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 表单高级应用和语义化
- 下一篇: 候鸟飞回来是什么歌呢?