Encountered an error while running 'ng serve' after updating Angular from version 11 to 12. The error details are as follows:
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-layout-login',
styles: ['./login.css'],
templateUrl: './login.component.html'
})
export class LayoutLoginComponent implements OnInit, OnDestroy {
constructor( ) { }
public ngOnInit() {
window.dispatchEvent( new Event( 'resize' ) );
document.body.className = 'hold-transition login-page';
}
public ngOnDestroy() {
document.body.className = '';
}
}
login.css (empty):
package.json:
{
"name": "iworklist",
"version": "0.1.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
// Other scripts omitted for brevity
},
"private": true,
"dependencies": {
"@angular/animations": "~12.2.16",
// Other dependencies listed here
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.2.16",
// Other dev dependencies listed here
}
}
Looking for assistance in resolving this error.