Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 如何将自定义指令用于x-editable_Angularjs_X Editable - Fatal编程技术网

Angularjs 如何将自定义指令用于x-editable

Angularjs 如何将自定义指令用于x-editable,angularjs,x-editable,Angularjs,X Editable,我想在可编辑文本中使用一些自定义指令 <span ui-Blur="testfn(price);" editable-text="entry.product_id" e-name="product_id" e-style="width: 200px" e-form="sentryform" e-required> </span> 我想在上面的文本框上触发一些模糊事件,我已经为正常文本框编写了指令,但不适用于上面显

我想在可编辑文本中使用一些自定义指令

 <span  ui-Blur="testfn(price);" editable-text="entry.product_id" 
         e-name="product_id" e-style="width: 200px"  e-form="sentryform" 
         e-required> 
  </span> 


我想在上面的文本框上触发一些模糊事件,我已经为正常文本框编写了指令,但不适用于上面显示的“可编辑文本”。

x-editable有很好的功能,所有的指令都以“e-”前缀附加到实际的编辑控件中(当然带有“e-”条带)。例如,要在添加的输入框中添加样式,请执行以下操作:

e-style="color:red"
因此,加入:

您提到的span元素上的
e-ui-Blur=“testfn(price)”
将导致该元素添加到进入编辑模式时生成的输入dom元素中