Hi
In Angular Version 17 AppModule does not exist where i should write this code & also the code marked in Green. Image attached
import { BrowserAnimationModule} from '@angular/platform-browser/animations';

Thanks
Hi
In Angular Version 17 AppModule does not exist where i should write this code & also the code marked in Green. Image attached
import { BrowserAnimationModule} from '@angular/platform-browser/animations';

Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ramco RamcoPosted Apr 19, 2024, 4:24 AM
Hi Naimish
I have attached image . It is snot showing . What can be the reason
Thanks
Naimish MakwanaPosted Apr 19, 2024, 3:43 AM
In Angular, regardless of the version, the
AppModuleis a fundamental part of the application structure. If you can’t find it, it might be due to a different project structure or a custom configuration.The code you’ve written seems to be importing the
BrowserAnimationsModulefrom@angular/platform-browser/animations, which is correct. However, there seems to be a typo in your import statement. It should beBrowserAnimationsModule, notBrowserAnimationModule.Here’s a basic example of how you can use it:
In this code,
BrowserAnimationsModuleis imported and added to theimportsarray in@NgModule. This makes animation support available everywhere in your application.Please replace
'./app.component'with the path to your actualAppComponent.Thanks