Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: `
<!-- will be lazy loaded and uses standard Angular template bindings -->
<some-element
*axLazyElement="elementUrl"
[data]="data"
(dataChange)="handleChange($event)"
>
</some-element>
`,
})
export class FeatureComponent {
elementUrl = 'https://your-org.com/elements/some-element.js';

data: SomeData;

handleChange(change: Partial<SomeData>) {
// ...
}
}
```


## Supported Angular versions

Library was tested with the following versions of Angular and is meant to be used
Expand Down