Dumb question for Web Animations


#1

Hi all! This is probably a dumb question from a guy who doesn’t know npm and related technologies. I’m trying to following this tutorial about how to use basic animations, and I’m not able to install the web animations library he points me to. Specifically, he says to put the web-animations.min.js file from the Web Animations Git repo in my assets/ directory. But there is no such file in the repo! Do I need to build it or something first? I also tried installing the library with “npm install web-animations-js --save” but not avail. Thanks so much!!


#2

If you want to use the web-animations API, please refer to the Angular2 up-to-date docs about this subject. You can find them over here:

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

As you can see the animations should be imported from here:

import { BrowserAnimationsModule } from ‘@angular/platform-browser/animations’;

web-animations.min.js from the repo is specifically for browsers that don’t already support the web-animations out of the box.

Assets only get copied over to the www folder on build, so if it isn’t to be found over there you probably should rebuild your project.