77
88# angular2-expandable-list
99
10- > Expandable lists made easy for Angular2
10+ > Expandable lists made easy for Angular2+
1111
12- angular2-expandable-list is an HTML ` <angular2-expandable-list> ` tag enhanced with styling and animation
12+ Angular2 Expandable List is an HTML ` <angular2-expandable-list> ` tag enhanced with styling and animation.
13+ now compatible with Angular4 too.
1314
14- Plunker DEMO available [ here] ( https://embed.plnkr.co/uAPJq0/ )
15+ ** Plunker DEMOs:**
16+
17+ * [ Angular2 Expandable List with Angular2] ( https://embed.plnkr.co/uAPJq0/ )
1518
1619![ screenshot] ( http://i.imgur.com/Qa402ev.gif )
1720
@@ -26,6 +29,7 @@ Plunker DEMO available [here](https://embed.plnkr.co/uAPJq0/)
2629* [ Options] ( #options )
2730 * [ Properties] ( #properties )
2831 * [ Attributes] ( #attributes )
32+ * [ Angular 4] ( #angular-4 )
2933* [ Changelog] ( #changelog )
3034* [ License] ( #license )
3135
@@ -259,6 +263,36 @@ export class AppComponent {
259263| disabled | boolean | When applied to the ` expandable-list-item ` , disabled the
260264| is-expanded | boolean | Reflect the expandable state of the item list element
261265
266+ ## Angular 4
267+
268+ This module will work with Angular 4 projects but requires ` @angular/animations `
269+ to be included in your project as the Angular animations are not part of the ` @angular/core `
270+ library starting from the version >=4.
271+
272+ Make sure to include the ` BrowserAnimationsModule ` in your App module like in the following example:
273+
274+ ``` ts
275+ import { NgModule } from ' @angular/core' ;
276+ import { BrowserModule } from ' @angular/platform-browser' ;
277+ import { AppComponent } from ' ./app.component' ;
278+
279+ import { BrowserAnimationsModule } from ' @angular/platform-browser/animations' ;
280+
281+ @NgModule ({
282+ bootstrap: [ AppComponent ],
283+ declarations: [
284+ AppComponent ,
285+ ],
286+ imports: [
287+ BrowserModule ,
288+ BrowserAnimationsModule , // Angular 4 Only
289+ ],
290+ })
291+ export class AppModule { }
292+ ```
293+
294+ Everything else will just work as before.
295+
262296## Contributing
263297
264298This package is using the AngularJS commit messages as default way to contribute
0 commit comments