标签:
网上找了很多教材都搜索不到该部分类型,自己测试了下写了该教程。
"jquery":"*",
"tether":"*",
"bootstrap":"*",
"moment":"*",
"eonasdan-bootstrap-datetimepicker":"*"
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"../node_modules/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css",
"styles.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/tether/dist/js/tether.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js",
"../node_modules/moment/min/moment.min.js",
"../node_modules/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"
],
<div class="container">
<div class="row">
<div class=‘col-sm-6‘>
<div class="form-group">
<div class=‘input-group date‘ id=‘datetimepicker1‘>
<input type=‘text‘ class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
</div>
</div>
</div>
declare var $:any;
@Component({
selector:"app-root",
templateUrl:"bootstrap.template.html"
})
export class BootstrapComponent extends OnInit{
ngOnInit(): void {
$(function () {
$(‘#datetimepicker1‘).datetimepicker();
});
}
}
标签:
原文地址:http://www.cnblogs.com/gaoxing/p/5944078.html