2017-07-01 1 views

Répondre

1

De l'documentation pour ng-file-upload il y a une directive personnalisée que vous pouvez utiliser pour afficher une vignette aperçu d'une image:

<div|span|... 
*ngf-thumbnail="file" // Generates a thumbnail version of the image file 
ngf-size="{width: 20, height: 20, quality: 0.9}" 
    // the image will be resized to this size 
    // if not specified will be resized to this element`s client width and height. 
ngf-as-background="boolean" 
    // if true it will set the background image style instead of src attribute. 
> 

Voici quel exemple tag miniature pourrait ressembler

<img class="your_class" 
    ngf-thumbnail="path/to/file.jpg" 
    ngf-size="{width:200, height:200, quality:1.0}"/> 
+0

Merci pour la documentation. J'ai fait une erreur dans mon code. Il fonctionne maintenant. – Sahithi