Wednesday, October 28, 2015

AngularStrap and AngularMotion

Yesterday, I wrote about using AngularStrap. Today, I managed to get going with it and implement a couple of components. However, I faced a problem with the $alert service, where the alert was not animating in or out. The docs on the web site are very brief with only one example. I looked around for examples and I ran across a couple of people complaining that animation is not working for them either, but no solution worked for me (including ngAnimate) did not help. After looking through the source code it still was not clear what was going wrong. I searched some more and came across AngularMotion which is a framework for building animations in Angular. On that site (which happens to be maintained by the same developer), I found an example that uses AngularStrap. It turns out that all I needed was to include the AngularMotion CSS, which solved the problem. There is no mention whatsoever on the AngularStrap site so I reported a documentation bug.

Summary: to use AngularStrap you must include the AngularMotion CSS.

No comments:

Post a Comment