2017-07-01 15 views

答えて

1

あなたは画像のサムネイルプレビューを表示するために使用できるカスタムディレクティブがある:ここでは

<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. 
> 

は、例えばサムネイルタグが

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

おかげのように見えるかもしれないものですドキュメンテーションのために。私は自分のコードで間違いを犯しました。それは今働いている。 – Sahithi

関連する問題