I am working on upgrading a project from Angular 7->18
I have a working angular 9 project, minus so third party controls I need to replace
when upgrading from 9 to 10
I was working on this step
- In version 10, classes that use Angular features and do not have an Angular decorator are no longer supported. Read more. ng update will migrate you automatically.
Running ng update did NOT migrate automatically but recommend that I upgrade to 11
So I started the migration from 10 -> 11
I have run the steps
- Run ng update @angular/core@11 @angular/cli@11 which should bring you to version 11 of Angular.
- Run ng update @angular/material@11.
- Angular now requires TypeScript 4.0. ng update will migrate you automatically.
The project compiles, and even runs (ng serve) but in the browser and all my test I get the error that
No template specified for component in the test
on the browser I get
No template specified for component LoginComponent, since it is my first component
The declartion of the LoginComponent
@Component({
selector: 'login',
templateUrl: './login.component.html'
})
export class LoginComponent extends BasePage implements AfterViewInit {
I don’t know what other code to share at this time
Also I change the BasePage Item from
@Component({
selector: 'base-page',
templateUrl: './base-page.component.html'
})
export class BasePage implements OnDestroy {
To removing the @Component because base-page.component.html but I was talking with a developer. @Component was added because without it the IDE displays this error
Class is using Angular features but is not decorated. Please add an explicit Angular decorator.(-992007)
But the code still builds and serves, and the problem still exists