MaterializeフレームワークのModal
コンポーネントとAngularjsのui-router
モジュールを利用しようとしていますが、正しく設定しようとしています。AngularjsとMaterializeCSSを使用したステートフルモーダルの作成
ここではどのように私は把握しようとしている何を私の$stateProvider
定義
// Modal States ===============================
.state("modal", {
views:{
"modal": {
templateUrl: "resources/templates/modal.html"
}
},
abstract: true
})
.state("modal.modal1", {
views:{
"modal": {
templateUrl: "resources/templates/modals/modal-content-1.html"
}
}
})
とトリガー
<div ui-view="modal" autoscroll="false"></div>
と一緒に私のindex.htmlに `UI-ビューの定義がありますモーダルをレンダリングし、同時にMaterializeボタンのトリガを使用してmodal1
状態に切り替えます。
モーダルのinitは十分に簡単です:
<a class="waves-effect waves-light btn" href="#modal1">Modal</a>
<!-- Modal Structure -->
<div id="modal1" class="modal">
<div class="modal-content">
<h4>Modal Header</h4>
<p>A bunch of text</p>
</div>
<div class="modal-footer">
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Agree</a>
</div>
</div>
任意の考え?どうもありがとう!