Angularjs による レイヤーUI
イシュー
- JavaScriptによるレイヤーUIを実装するためにそのベストプラクティスがないかを確認する
参考
- javascript - AngularJS, show popups - The most elegant way? - Stack Overflow
- 選択肢1:controller に domを追加
- 選択肢2:static htmlをshow / hideする
- $modal によるpartial template が the most elegant?
- AngularUI Bootstrapを使ったモーダル画面表示 - シュンツのつまづき日記
- 説明が丁寧
- AngularJSではじめるHTML5開発 – Part6 UI Bootstrapを用いたプログレスバーとモーダルダイアログ at nkjmkzk.net
- AngularJSではじめるHTML5開発 – Part8 モーダルダイアログによる新規レコード作成フォーム at nkjmkzk.net
- Commangular
- Commangular
- Building large apps with Angular.js
- Dan Wahlin - Building an AngularJS Modal Service
- Building SPA using AngularJS - Part 3 - Bit of Technology
- deferloader » [salesforce][SPA][AngularJS] AngularJS+force.comでSingle Page Application
- AngularJS SPA Template extension
- MarlabsInc/webapi-angularjs-spa · GitHub
- Developing a Large Scale Application with a Single Page Application (SPA) using AngularJS - CodeProject
- RIAに代わる技術、実用的SPAについて考える~第7回エンタープライズ×HTML5ナイトセミナー~ | HTML5Experts.jp
- SPA課題
- DOMツリーを分離して小さく
- TaskQueueで不必要なレイアウト処理を停止 *入出力処理はWebWorkersで止めない
- いまや最も優れたJavaScriptフレームワーク「AngularJSリファレンス」出版記念会 | HTML5Experts.jp
- SPA課題
- AngularJS + UI Bootstrap で modal を使用するときの注意点 - Qiita
$Modal サービス
参考
ui.bootstrap.Modal
- modalの使い方を把握する。
- 単純に$modal.open すると、modalになっていない、、
ui.bootstrap.modal 翻訳
$modal is a service to quickly create AngularJS-powered modal windows. Creating custom modals is straightforward: create a partial view, its controller and reference them when using the service.
- $modal はすぐ AngularJSを使ったモーダルウィンドウを作成するためのサービスです。カスタムモーダルの作成は簡単です。:部分的なビューと、そのコントローラを作成し、サービスを使用するときにそれらを参照します。
The $modal service has only one method: open(options) where available options are like follows:
$modalサービスは、メソッドが1つ open(options) だけです。: 利用可能なオプションは次のようなものです。
templateUrl - a path to a template representing modal's content
- template - inline template representing the modal's content
- scope - a scope instance to be used for the modal's content (actually the $modal service is going to create a child scope of a provided scope). Defaults to $rootScope
- controller - a controller for a modal instance - it can initialize scope used by modal. Accepts the "controller-as" syntax in the form 'SomeCtrl as myctrl'; can be injected with $modalInstance
- controllerAs - an alternative to the controller-as syntax, matching the API of directive definitions. Requires the controller option to be provided as well
- resolve - members that will be resolved and passed to the controller as locals; it is equivalent of the resolve property for AngularJS routes backdrop - controls presence of a backdrop. Allowed values: true (default), false (no backdrop), 'static' - backdrop is present but modal window is not closed when clicking outside of the modal window.
- keyboard - indicates whether the dialog should be closable by hitting the ESC key, defaults to true
- backdropClass - additional CSS class(es) to be added to a modal backdrop template
- windowClass - additional CSS class(es) to be added to a modal window template
windowTemplateUrl - a path to a template overriding modal's window template size - optional size of modal window. Allowed values: 'sm' (small) or 'lg' (large). Requires Bootstrap 3.1.0 or later The open method returns a modal instance, an object with the following properties:
close(result) - a method that can be used to close a modal, passing a result
- dismiss(reason) - a method that can be used to dismiss a modal, passing a reason
- result - a promise that is resolved when a modal is closed and rejected when a modal is dismissed
opened - a promise that is resolved when a modal gets opened after downloading content's template and resolving all variables In addition the scope associated with modal's content is augmented with 2 methods:
$close(result)
- $dismiss(reason) Those methods make it easy to close a modal window without a need to create a dedicated controller.
backdrop='static' でもクリックできる
- AngularJSではじめるHTML5開発 – Part6 UI Bootstrapを用いたプログレスバーとモーダルダイアログ at nkjmkzk.net
- Dialog not working on Bootstrap 3.0 · Issue #722 · angular-ui/bootstrap · GitHub