- Learning AngularJS Animations
- Richard Keller
- 239字
- 2021-08-05 17:29:44
Preface
The AngularJS framework is a turning point in the evolution of web development. It really helps developers to produce professional web apps by writing less JavaScript code.
The ngAnimate module, developed by the core team of AngularJS and the open source community, integrated AngularJS features with animation web standards, providing all the benefits from standardization with AngularJS development patterns.
Before animations were introduced to AngularJS, integrating animations was a bit tricky, as in AngularJS, changes to the model affect the view implicitly (it's part of the two-way data binding concept). In other words, the DOM life cycle management is often controlled by the AngularJS core and animations should be triggered in between those manipulations. To solve this problem, the ngAnimate module was written and redesigned to be completely based on CSS classes. This means that animations should be applied based on element classes. Classes are appended or removed from elements on specific events, so we are able to apply animations as the entry of an element on DOM and the imminent exit of an element from DOM.
This book will help you learn from the beginning how to add animations to AngularJS web apps, focusing on the ngAnimate module. It's an optional module in AngularJS because the framework is going in a direction that will allow you to choose which modules to use so that the module can fit your needs and be as light as you desire.