Skip to content

ironsweet/angular-collapse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

angular-collapse

The trick is simple. Wrap the content with a zero height div, hide it with absolute positioning, change the height, and wait the browser to use CSS3 transition to finish the trick.

Requirements: AngularJS 1.0.0+

Live demo: here

Usage

  1. list 'angular-collapse' as a dependency for you app.
angular.module('myApp', ['angular-collapse'])
  1. include the supplied CSS file (or merge them within your own).

  2. add 'collapse' directive to your content. For example,

    <div collapse='isExpanded' ng-click='isExpanded = !isExpanded'>
        collapsible content here...
    </div>

Why I created this

This is really a simple and basic requirement, that has a solution already in Bootstrap. But I found no one available around for Angular, or maybe it's too small to be a standalone module.

License

MIT

About

A simple collapsible directive for your angular apps.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published