September 2017
Intermediate to advanced
450 pages
11h 24m
English
The animation library much like the router, http & forms library is now an optional dependency in Angular. This means if you are using animations in your Angular application you will need to import them from this separate package in Angular 4:
import {Component} from '@angular/core';import { trigger, state, style, animate, transition} from '@angular/animations';@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], animations: [ trigger('activateState', [ state('inactive', style({ backgroundColor: '#eee', marginLeft: '0' })), state('active', style({ backgroundColor: '#cfd8dc', marginLeft: '50px' })), transition('inactive => active', animate('100ms ...
Read now
Unlock full access