“Angular-ui bootstrap”を使用して、Bootstrap3のJavaScript部分をAngularJSに置き換えることができます。今回はdatepickerのサンプルを作成しました。
※オンラインマニュアル
Angular directives for Bootstrap
Angular-ui bootstrap : 2.5.0
AngularJS : 1.6.5
Bootstrap : 3.3.7
Inline
選択した日付: {{dt | date:'yyyy-MM-dd' }}
<!DOCTYPE html>
<html ng-app="demoApp">
<head>
......
<script src="../js/angular-1.6.5.min.js"></script>
<script src="../js/ui-bootstrap-tpls-2.5.0.min.js"></script>
<link href="../js/app.js">
<link href="../css/bootstrap-3.3.7.min.css" rel="stylesheet">
</head>
.....
<div ng-controller="DatepickerDemoCtrl">
<h4>Inline</h4>
<div style="display:inline-block; min-height:290px;">
<div uib-datepicker ng-model="dt" datepicker-options="options"
class="well well-sm">
</div>
</div>
<pre>選択した日付: <em>{{dt | date:'yyyy-MM-dd' }}</em></pre>
</div>
var demoApp = angular.module('demoApp', ['ui.bootstrap']);
demoApp.controller("DatepickerDemoCtrl", function($scope) {
$scope.dt = new Date();
$scope.options = {
showWeeks: false,
formatDay: 'dd',
formatMonth: 'MM',
formatYear: 'yyyy',
formatDayHeader: 'EEE',
formatDayTitle: 'yyyy/MM',
formatMonthTitle:'yyyy'
};
});
- ブートストラップ3のサンプルレイアウトoffcanvasの設定方法
- Bootstrap3のtabを使って目次、表示の切り替え
- ブートストラップ3のグリッドの挙動をまとめました
- ブートストラップ3のaffixとScrollSpyを使ったサンプルレイアウト
- Bootstrapのフリーのテーマを使ってデザインを簡単にカスタマイズ
- Bootstrap3でリスト、リストグループ、パネルの階層を折りたたみ(collapse)
- Bootstrap3のサンプルOffcanvasのJavaScriptをAngularJSで書き換え
- Bootstrap3でAngularJSを使用 accordion
- Bootstrap3でAngularJSを使用 carousel
- Bootstrap3でAngularJSを使用 collapse
- Bootstrap3でAngularJSを使用 dropdown
- Bootstrap3でAngularJSを使用 datepicker
- Bootstrap3でAngularJSを使用 modal
- Bootstrap3でAngularJSを使用 tooltip、popover
- Bootstrap3でAngularJSを使用 tab
- Bootstrap3でAngularJSを使用 pagination
- Angular2とBootstrap4でAccordion
- Angular2とBootstrap4でCarousel
- Angular2とBootstrap4でドロップダウン
- Angular2とBootstrap4でツールチップ、ポップオーバー
- Angular2とBootstrap4でタブ
- Angular2とBootstrap4でページネーション(ページャー)
- Angular2とBootstrap4でcollapse
- Angular2とBootstrap4でモーダル
- Angular2とBootstrap4でdatepicker
Angular-ui bootstrap
ng-bootstrap(Angular2、Angular4)