Add BrowserAnimationsModule optional support to new applications
See original GitHub issueBug 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.
ng new test-animation
- 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';
}
- Open
app.component.html
and use the@testFadeIn
trigger ng serve
and open the developer tools.
The log given by the failure.
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:
- Created 6 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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?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.