Is Apollo template compatible with existing Angular projects generated by CLI? #1571
-
I tried to follow the setup tutorial on YouTube but failed with below error message
I'm curious whether this is a mis-configuration on my end, or it's caused by incompatibility with projects generated with EnvironmentTemplate used: apollo-ng-17.0.0 Steps to re-produce
@import "assets/layout/styles/layout/layout.scss";
...
import { AppLayoutModule } from './layout/app.layout.module';
@Component({
selector: 'app-root',
standalone: true,
imports: [CommonModule, RouterOutlet, AppLayoutModule],
...
})
export class AppComponent {
title = 'my-app';
}
import { Routes } from '@angular/router';
import { AppLayoutComponent } from './layout/app.layout.component';
import { MyPageComponent } from './my-page/my-page.component';
export const routes: Routes = [
{
path: '',
component: AppLayoutComponent,
children: [
{ path: '', component: MyPageComponent }
]
}
];
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi, I am just guessing around:
Can you have a look if you load Cheers |
Beta Was this translation helpful? Give feedback.
I think
NG8002: Can't bind to 'ngClass' since it isn't a known property of 'div'
is a follow-up error that is not directly related toBrowserModule
.ngClass
comes from theCommonModule
. If you use Stand-Alone-APIs theCommonModule
is missing in the Setup.The Apollo Theme does not use Standalone-APIs, yet.
You might need to migrate these components to Standalone-Components.
You can use a script for that: https://angular.io/guide/standalone-migration#migrate-an-existing-angular-project-to-standalone
Hope this helps