Skip to content

rushimusmaximus/angular2-modal

 
 

Repository files navigation

Angular 2: Bootstrap Modal/Dialog window.

DISCLAIMER

Angular 2 is still in the works. The core concepts are solid, but the API may change. If you find that a code snippet that does not work, please message me, and I will update.

Built with angular 2 Beta

Features:

  • Bootstrap model size configurable.
  • Select cancel/quit key.
  • Cascading.
  • Element blocking.
  • Blocking / Non blocking modal.
  • Modal as a component, replace the content by supplying a custom component.

Click for the Demo Click for the auto generated Docs

Blog post will be up soon! look for it in my Blog

See src/demo for demo app with examples.

Will try to add documented examples if time allows.

Installation

    npm install angular2-modal --save

Running locally

git clone https://github.com/shlomiassaf/angular2-modal.git  
npm install  
typings install  
webpack-dev-server // development, webpack -p to build.  
browse to localhost:3000  

You can apply custom modals based on components.

Publishing

Publishing is done using the TypeScript compiler directly (no webpack) The process involves compiling into a directory called dist Webpack is using the build directory. Since I didn't find a way to instruct tsc what config file to use (i.e: a different tsconfig.json) I created a publish directory instead and set the --project argument accordingly.

Issues and TODO's

Animation

Not so complicated but not in angular 2 at the moment.

Module

Set webpack do build angular2-module.js as an initial webpack module (currently its not...) This will allow using it as an input for other projects.

Minimize DOM interaction

Reduce manual DOM interaction, do more usage of host object in @Component. Append child to the DOM using the angular 2 way, if you know tell me.

Allow Element blocking modal to be set on any element.

Currently blocking an element requires it to have an angular template variable placed in one of his children. This is due to the current angular implementation, as I see it. I have yet to find an angular way of inserting a compiled element to a native element/component without effecting it. See issue 6071

Bootstrap free / ShadowDOM

Make it fly solo....

Support for custom backdrops.

About

Angular2 Modal (dialog) window bootstrap style.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 81.9%
  • JavaScript 10.1%
  • HTML 7.7%
  • CSS 0.3%