diff --git a/README.md b/README.md index 2d7f205..429b79e 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,42 @@ export class FeatureComponent { } ``` +For standalone components, the modules and the schema are moved to the component declaration itself + +```typescript +import { Component } from '@angular/core'; +import { LazyElementsModule } from '@angular-extensions/elements'; + +@Component({ + selector: 'your-org-feature', + standalone: true, + schemas: [CUSTOM_ELEMENTS_SCHEMA], + imports: [ + LazyElementsModule, + // your own imports below + ] + template: ` + + + + `, +}) +export class FeatureComponent { + elementUrl = 'https://your-org.com/elements/some-element.js'; + + data: SomeData; + + handleChange(change: Partial) { + // ... + } +} +``` + + ## Supported Angular versions Library was tested with the following versions of Angular and is meant to be used