2016-09-15 55 views
12

我得到了我裏面輸入以下錯誤:SafeValue必須使用[屬性] =結合:

SafeValue must use [property]=binding: http://www.myurl.com (see http://g.co/ng/security#xss) 

我確實在我的組件:

this.myInputURL = this.sanitizer.bypassSecurityTrustUrl('http://www.myurl.com'); 

而且在我的模板:

Share URL: <md-input [value]="myInputURL" type="text"></md-input> 

怎麼了?

+0

你想僅在輸入控件中顯示它嗎?它說,它不安全的注入DOM – micronyks

+0

嗯..我沒有看到任何其他選項允許複製鏈接URL快速和簡單 – TheUnreal

回答

相關問題