question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add BrowserAnimationsModule optional support to new applications

See original GitHub issue

Bug Report or Feature Request (mark with an x)

  • bug report -> please search issues before submitting
  • feature request

Versions.

@angular/cli: local (v1.1.0-beta.0, branch: master)
node: 6.9.5
os: darwin x64

Repro steps.

  1. ng new test-animation
  2. Open the app.component.ts and replace its content with the snipped below
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('testFadeIn', [
      state('void', style({ opacity: '0' })),
      state('*',   style({ opacity: '1' })),
      transition('void <=> *', animate('100ms ease-in'))
    ])
  ]
})
export class AppComponent {
  title = 'app';
}
  1. Open app.component.html and use the @testFadeIn trigger
  2. ng serve and open the developer tools.

The log given by the failure.

image

Desired functionality.

To be able to create new applications that support animations without additional configurations. This would make it easier to use transitions and Angular Material.

An option I would propose is a --animation flag to the ng new command which would allow users to opt-in on supporting animations for their applications.

Mention any other details that might be useful.

Animations is one of the features I really like about angular, and can be sometimes tricky to set up. ^^

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
filipesilvacommented, May 11, 2017

We generally try to avoid adding library conditionals in ng new but maybe a single flag for all Angular Modules would be a good middleground. @hansl @Brocco @sumitarora thoughts?

0reactions
angular-automatic-lock-bot[bot]commented, Sep 9, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BrowserAnimationsModule - Angular
Angular is a platform for building mobile and desktop web applications. Join the community of millions of developers who build compelling user interfaces ......
Read more >
BrowserAnimationsModule does not work when imported in ...
To solve it we have to add CommonModule to exports array and all should work as expected. The good question is. However, I...
Read more >
Angular Material for Beginners (Part 1) | by Madhusha Ravishani
It asks to import the BrowserAnimationsModule into your application. It enables Angular animations. Configure settings II. If you install ...
Read more >
Tutorials - Cumulocity IoT Guides
Check out the tutorial application with c8ycli new my-app tutorial to have an ... { BrowserAnimationsModule } from '@angular/platform-browser/animations'; ...
Read more >
Angular Revisited: Standalone Angular applications, the ...
imports metadata option which also supports Angular modules. NgModule.providers. Lists providers that are added to the environment injector(s) ( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found