Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render link from an input #6

Closed
anouar1991 opened this issue Jul 12, 2020 · 3 comments
Closed

render link from an input #6

anouar1991 opened this issue Jul 12, 2020 · 3 comments

Comments

@anouar1991
Copy link

Good day !
I'm using this extension and I like it so far, I faced some issues using it such as rendering links from an input element. let me explain with an example:
I have a URL input
``
<input type="url" #url/>

<ng-container *ngIf="isUrl(url.value)">

<ngx-link-preview
[apiRoute]="'http://v2node.local/api/link-preview/test'"
[getApiEndpoint$]="apiCallbackFn"
[parseForLinksStr]="url.value"
[queryParamName]="'url'"
>

``
in this use case, the extension keeps sending requests on every found URL if le's say I wanted to get metadata for https://www.google.com I will be getting a list of previews for these links ( if they exist ) :
https://www.g.com
https://www.go.com
https://www.goo.com
https://www.goog.com
https://www.googl.com
https://www.google.com

image

It would be nice if there is an option for fetching only one link ( the last link for example). and make the fetching list of links optional

@btxtiger
Copy link
Owner

The links should be usually cleared on change (if I understood your issue correctly) 🤔
You can alternatively try using [links]="[url.value]", until I get a chance to check it tomorrow.

@btxtiger btxtiger pinned this issue Dec 6, 2020
@vipul306
Copy link

I tried to use ngx-link-preview.

I am using Angular 9

Once installed successfully, when I compiled it gives below error.

ERROR
Method not implemented.
at AstTranslator.visitQuote (D:\GitHub\VS05_JUL_2021\Frontend\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\expression.js:212:69)

Let me know if I am missing anything or any specific requirement to use this tag.

Thanks

@btxtiger
Copy link
Owner

@vipul306 is there the missing backslash in the error message? nd\node_modules@angular\co

@btxtiger btxtiger closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants