Skip to content

Commit 82c5220

Browse files
committed
Update peer dependency expectation
1 parent 62bfde8 commit 82c5220

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

projects/localess-angular/browser/src/components/schema-with-input.component.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, inject, input} from "@angular/core";
1+
import {Component, inject, Input, input} from "@angular/core";
22
import {LOCALESS_BROWSER_CONFIG} from "../localess.config";
33
import type {ContentDataSchema, ContentAsset, ContentLink, Links} from "../models";
44
import {findLink} from "../utils/link.utils";
@@ -20,15 +20,17 @@ export abstract class SchemaWithInputComponent<T extends ContentDataSchema = Con
2020

2121
config = inject(LOCALESS_BROWSER_CONFIG)
2222

23-
data = input.required<T>()
24-
links = input<Links>()
23+
@Input({required: true})
24+
data!: T;
25+
@Input({required: false})
26+
links: Links | undefined;
2527

2628
assetUrl(asset: ContentAsset): string {
2729
return this.config.assetPathPrefix + asset.uri;
2830
}
2931

3032
findLink(link: ContentLink): string {
31-
const links = this.links()
33+
const links = this.links
3234
if (links) {
3335
return findLink(links, link)
3436
}

0 commit comments

Comments
 (0)