0
我有一個IMG對象與src將改變後我的http請求。如何從[Angular 2]中的指令檢測圖像對象的src屬性更改?
如何在my-custom-directive中檢測此img屬性的更改?
< img my-custom-directive [src]="user.photo" />
我有一個IMG對象與src將改變後我的http請求。如何從[Angular 2]中的指令檢測圖像對象的src屬性更改?
如何在my-custom-directive中檢測此img屬性的更改?
< img my-custom-directive [src]="user.photo" />
你可以做財產這樣的指令結合:
<img [my-custom-directive]="user.photo" [src]="user.photo" />
謝謝@Harry – Eusthace