20 Dec '13, 10am

Animating Modals in Angular.js - #worthreading

Animating Modals in Angular.js Sean Griffin December 17, 2013 javascript design Modal dialogs are popular in rich client-side applications. When you have them, it's nice to have transitions between them. We could even take it a step further, and have separate transitions for opening/closing the modal, and another transition when we switch between them. Fancy Directives This is surprisingly simple to accomplish with Angular , using a handful of directives, and a service to encapsulate what we're currently displaying. We'll start by creating a "modal view" directive, with two options. One will control whether or not we're displaying the modal, and another will control what templateUrl to display. modalView = -> restrict: 'E' scope: _modalShow: '&modalShow' _modalContent: '&modalSrc' templateUrl: '/templates/modal_view.html' app.directive('modalView', modalView) Our template ...

Full article: http://robots.thoughtbot.com/animating-modals-in-angular-js

Tweets

Animating Modals in Angular.js

robots.thoughtbot.com 18 Dec '13, 2am

Animating Modals in Angular.js Sean Griffin December 17, 2013 javascript design Modal dialogs are popular in rich client-s...