I created an Angular library with a standalone component:
import { Component } from '@angular/core';
@Component({
selector: 'app-form-error',
standalone: true,
imports: [],
template: `
<ng-container>
Hello, World!
</ng-container>
`,
})
export class FormErrorComponent {
}
I am exporting it on the public-apis.ts
export * from './lib/form-error.component';
Then I import it in another project into my Standalone component:
import { FormErrorComponent } from 'myLib/projects/form-error/src/public-api';
@Component({
selector: 'app-dynamic-form',
standalone: true,
imports: [,
FormErrorComponent
],
and in my template:
<app-form-error></app-form-error>
I am always getting this error:
[ERROR] Transforming JavaScript decorators to the configured target environment ("chrome123.0", "edge122.0", "firefox115.0", "ios16.0", "safari16.0" + 7 overrides) is not supported yet node_modules/myLib/projects/form-error/src/lib/form-error.component.ts:3:0: 3 │ @Component({
When I do the same with a service it works perfectly fine, but not with a Standalone component.
Here is the error on Stackblitz