📅  最后修改于: 2023-12-03 15:23:49.622000             🧑  作者: Mango
要使用 Angular UI Bootstrap 制作 Timepicker,需要遵循以下步骤:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/2.5.0/ui-bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.0/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/2.5.0/ui-bootstrap-tpls.min.js"></script>
var app = angular.module('myApp', ['ui.bootstrap']);
<uib-timepicker ng-model="mytime"></uib-timepicker>
以下是一个例子:
<uib-timepicker ng-model="mytime" hour-step="2" minute-step="15" show-meridian="true" meridian-step="2"></uib-timepicker>
以上就是使用 Angular UI Bootstrap 制作 Timepicker 的全部步骤。
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/2.5.0/ui-bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.0/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/2.5.0/ui-bootstrap-tpls.min.js"></script>
<div ng-app="myApp">
<uib-timepicker ng-model="mytime" hour-step="2" minute-step="15" show-meridian="true" meridian-step="2"></uib-timepicker>
</div>
<script>
var app = angular.module('myApp', ['ui.bootstrap']);
</script>