angular 17 error working with accordion primeng

43 Views Asked by At

i have this error in my console : ERROR Error: NG05100: Providers from the BrowserModule have already been loaded. If you need access to common directives such as NgIf and NgFor, import the CommonModule instead.

my angular is version 17.1.0 new version of angular, I couldn't find any solution for my problem in documents as far as I searched, there is no app.module.ts file in this version

this is my app.component.ts :

import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import {CommonModule} from "@angular/common";
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {AccordionModule} from 'primeng/accordion';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [
    RouterOutlet,
    CommonModule,
    AccordionModule,
    BrowserAnimationsModule
  ],
  templateUrl: './app.component.html',
  styleUrl: './app.component.css'
})
export class AppComponent {
  title = 'primepractice';
}

I tried add BrowserModule in imports of app.component but still same error I tried remove CommonModule from imports of app.component but still same error

any idea how to solve it

not working any way please help me

0

There are 0 best solutions below