简体   繁体   中英

Angular 2 animations

Is it possible to animate elements on Angular 2 like on jQuery? For example, I want div containing sub-elements to expand/shrink when clicked. Does Angular 2 provide directives for this, or do I have to call jQuery inside Angular event handlers ?

Check out https://angular.io/docs/ts/latest/guide/animations.html

Remember to use the polyfills for older browsers.

Just use bootstrap accordion . Here is a link to it https://getbootstrap.com/docs/4.3/components/collapse/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM