使用 angularJS 開心的寫一個 directive 使用獨立 scope (isolated scope) 的時候踩到一個filefox only
的坑,因為只有 filefox 有,在 Chrome, Safari, ie 都沒發生過實在太特別了..所以紀錄一下..OTZ..感謝: raphahsu
。
直接看範例檔:
sample Code 功能是 input + remove button, 點擊 button 將會把 input 內容清空
相當於 <input type='search'/>
的功能。
|
|
主要是16行: replace: true
這部分不要用或者設定為 false
既可。
因此範例檔直接執行會是錯誤的狀態。