Comments (10)
Hi @AnthonyNahas
Thank is not what I meant. Let's say we have two input fields for links (i.e. one for media articles, one for youtube videos/interviews)
<form [formGroup]="pressForm">
<mat-form-field appearance="outline">
<mat-label> New Article Links </mat-label>
<textarea matInput matTextareaAutosize matLinkPreview minRows="6"
formControlName="articles"></textarea>
</mat-form-field>
<mat-link-preview-container [multiple]="true"></mat-link-preview-container>
</form>
<form [formGroup]="videoForm">
<mat-form-field appearance="outline">
<mat-label> Video Links </mat-label>
<textarea matInput matTextareaAutosize matLinkPreview minRows="6"
formControlName="videos"></textarea>
</mat-form-field>
<mat-link-preview-container [multiple]="true"></mat-link-preview-container>
</form>
Now if we put a link inside the first text area, it renders the preview in both containers
Ideally, it would be nice to be able to link input fields to specific containers so multiple instances can be used in the same component. Similar to how Angular Datepicker is implemented
from link-preview.
what do you mean with multiple link preview container ?
The mat-link-preview-container
component ?
Did you try the multiple
input ? It will allow you to render multiple links and url within one container..
check this out
Please feel free to provide more info about your feature request
from link-preview.
I see! I will really appreciate a PR from you !!
from link-preview.
Any news on this? It would be really nice.
from link-preview.
Sorry I had no time to look into this. Have a quite lengthy backlog on my hands and this is towards the bottom. I am not a front end dev so I need to educate myself in type script a little bit before doing this. If anybody wants to pick it up feel free.
From what I remember during my initial pass, this behavior is coming from the fact that the injected service is a singleton. An easy, obvious work around is to, instead of having a shared service, to init one per component but I think it is bad practice to do so.
I think the best way to do this will be to pass the service some sort of identifier and keep the links in a map instead of a list. Datepicker, I believe achieves this through ViewChilds but as I said, I need to dig into datepicker to see exactly how they do it and the 30 files in the repo doesn't make it much easier. I need to block a good chunk of time to dig into that. Will try to get to this Q1 2020 hopefully.
from link-preview.
no problem thank u
from link-preview.
how to set linkpreview on page load
from link-preview.
Any news on this?
i am stuck.
how to show preveiw on page load if we have url?
from link-preview.
PR are welcome guys
from link-preview.
PR are welcome guys
any solution for this?
from link-preview.
Related Issues (20)
- An in-range update of autoprefixer is breaking the build 🚨 HOT 4
- Can I use this without the textarea input? HOT 5
- Angular 10 Error: Failed to compile entry-point @angular-material-extensions/link-preview (es2015 as esm2015) due to compilation errors: HOT 5
- I have 2 options video upload and url upload . After uploading video and then by URL preview is disappearing
- Failed to compile entry-point @angular-material-extensions/link-preview (`es2015` as esm2015) due to compilation errors: HOT 1
- how to clear the link preview after submitting the form in angular HOT 2
- An in-range update of autoprefixer is breaking the build 🚨 HOT 4
- An in-range update of angular2 is breaking the build 🚨 HOT 1
- An in-range update of @types/lodash is breaking the build 🚨 HOT 1
- An in-range update of core-js is breaking the build 🚨 HOT 1
- An in-range update of node-sass is breaking the build 🚨 HOT 1
- An in-range update of postcss is breaking the build 🚨 HOT 1
- Unable to use package when importing it in app module. NullInjectorError: No provider for InjectionToken. HOT 1
- feat: add schematics to the library (ng add @angular-material-extensions/link-preview)
- An in-range update of webpack-cli is breaking the build 🚨 HOT 8
- Reset preview data after submitting the form HOT 1
- An in-range update of rollup is breaking the build 🚨 HOT 46
- Binding data after link preview HOT 1
- MatLinkPreview Directive Security Flaw? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from link-preview.