Unexpected value 'RoundProgressModule' imported by the module 'AppModule'. Please add a @NgModule annotation

927 views Asked by At

After Updating the packages from angular4 to angular5.0 and angular-svg-round-progressbar1.2.0. It throws error in Browser console

Unexpected value 'RoundProgressModule' imported by the module 'AppModule'.
Please add a @NgModule annotation
.

See the below code:

.html

 <round-progress [color]="'orange'"
                        [current]="idleCountdown" [max]="100" [radius]="50"></round-progress>

.ts

@Component({
    templateUrl: './dashboard.component.html',
    styleUrls: [],
    encapsulation: ViewEncapsulation.None,
})
export class DashBoard implements OnInit {
 Countdown: number;

  ngOnInit() {

  this.idleCountdown = 40;
  }    
}

app.module.ts

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { RouterModule } from '@angular/router';
import { MaterialModule } from '@angular/material';  
import { RoundProgressModule } from 'angular-svg-round-progressbar';

import { AppComponent } from './app.component';
import { routing } from './app.routing';

@NgModule({
    imports: [
        BrowserModule,
        FormsModule,
        HttpModule,
        RouterModule,
        MaterialModule,
        RoundProgressModule
        ],
    declarations: [
        AppComponent,
        ], 
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }

Packages.json

 "dependencies": {
    "@angular/animations": "^5.0.0",
    "@angular/cdk": "^5.0.0-rc0",
    "@angular/common": "^5.0.0",
    "@angular/compiler": "^5.0.0",
    "@angular/core": "^5.0.0",
    "@angular/forms": "^5.0.0",
    "@angular/http": "^5.0.0",
    "@angular/material": "^5.0.0-rc0",
    "@angular/platform-browser": "^5.0.0",
    "@angular/platform-browser-dynamic": "^5.0.0",
    "@angular/platform-server": "^5.0.0",
    "@angular/router": "^5.0.0",
    "angular-svg-round-progressbar": "^1.2.0"
    }
0

There are 0 answers