Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-animations

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-animations

Angular Animations Utilities

  • 0.0.1-beta.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
decreased by-3.75%
Maintainers
1
Weekly downloads
 
Created
Source

Angular-Animations

Angular Animations utility library for Angular 4.2+ It is based on animate.css, but can be used in a declarative manner with an angular app

Prerequisites

Make sure you import BrowserAnimationModule in your angular app.

 npm i @angular/animations@latest --save

Import BrowserAnimationsModule from @angular/platform-browser/animations in your root NgModule

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@NgModule({
  declarations: [
    ...
  ],
  imports: [
    ...
    BrowserAnimationsModule
  ],
})
export class AppModule { }

Installation and Usage

 npm i angular-animations --save

Animations on enter / on leave

Animations on enter / on leave are triggered in a moment when element is added to or removed from the dom. Basic example would be with using *ngIf template directive.

Import animation functions that you want to use and add them to the component animations declaration:

import { fadeInOnEnterAnimation, fadeOutOnLeaveAnimation } from 'angular-animations';

@Component({
  selector: '...',
  templateUrl: '...',
  styleUrls: ['...'],
  animations: [
    fadeInOnEnterAnimation(),
    fadeOutOnLeaveAnimation()
  ]
})

and use them in the template:

<div  *ngIf="CONDITION"  [@fadeInOnEnter] [@fadeOutOnLeave]></div>

Running Demo App

npm start

Authors

  • Chris Filipowski - filipows

License

This project is licensed under the MIT License - see the LICENSE file for details

Keywords

FAQs

Package last updated on 20 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc