Skip to content

Commit

Permalink
Merge pull request #23 from yaegerbomb/master
Browse files Browse the repository at this point in the history
Updated readme.md with documentation of keep-alive
  • Loading branch information
TheRusskiy committed Oct 5, 2016
2 parents 7009be6 + 6b3c1a5 commit 62853af
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -16,6 +16,9 @@ In order to use a directive add attribute <code>ng-slide-down</code> to an eleme
#### Lazy rendering
Has option to prevent HTML generation of contents unless expanded (due to performance considerations). Optimal for a big number of widgets (production tested).
All you need to do is to add <code>lazy-render</code> attribute to an element with a directive.
###### Keep Alive
Additionally, if you need to keep the contents of the expand and collapse from recompiling after the initial expand takes place, adding <code>keep-alive</code> will prevent re-rendering
of the html template. This is usefull if you are expanding / collpasing content that may contain directives / components that makes API calls on initializtion.
#### Automatic height adjustment
Directive watches for a height of it's content and readjusts it's size automatically - no extra work required.
## Options
Expand All @@ -36,6 +39,12 @@ Easing function (`transition-timing-function`) to use in the animation (default
Add this attribute to prevent rendering when content is hidden. Doesn't require value.

<code>&lt;div ng-slide-down=&quot;slideDown&quot; lazy-render&gt;</code>

#### keep-alive
Add this attribute to prevent recompiling of content in the template. Useful for content that may contain addition directives / components that receive data from an API.

<code>&lt;div ng-slide-down=&quot;slideDown&quot; lazy-render keep-alive&gt;</code>

#### on-close
Expression evaluated when slider is finished closing

Expand Down

0 comments on commit 62853af

Please sign in to comment.