Skip to content

Commit

Permalink
Update README.md (#1169)
Browse files Browse the repository at this point in the history
  • Loading branch information
deebloo authored Feb 12, 2025
1 parent c6210be commit b7edbef
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/di/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,6 @@ Since custom elements are treated the same as any other class they can define pr
This also makes it easy to attributes to define values for the service.

```TS
const app = new DOMInjector();

app.attach(document.body);

interface ColorCtx {
primary: string;
secondary: string;
Expand All @@ -355,6 +351,7 @@ interface ColorCtx {
const COLOR_CTX = new StaticToken<ColorCtx>('COLOR_CTX')

@injectable({
name: 'color-ctx',
provideSelfAs: [COLOR_CTX]
})
class ColorCtx extends HTMLElement implements ColorCtx {
Expand Down

0 comments on commit b7edbef

Please sign in to comment.