Using ng-remote-validate directive along with Angular-xeditable directive

362 views Asked by At

I am trying to do remote validation using ng-remote-validate directive on an editable textbox, created using Angular-xeditable directive.

HTML:

<a href="#" editable-text="vm.product.name" onaftersave="vm.updateProduct()"
ng-remote-validate="{{vm.pageUrl}}Product/IsUnique" dummy="{{vm.dummyName}}"
ng-remote-method="GET">{{vm.product.name || 'not set'}}</a>

But Console window is showing the following error:

Error: [$compile:multidir] Multiple directives [editableText, ngRemoteValidate] asking for new/isolated scope on: <a href="#" editable-text="vm.product.name" onaftersave="vm.updateProduct()" ng-remote-validate="{{vm.pageUrl}}Product/IsUnique" dummy="{{vm.dummyName}}" ng-remote-method="GET">

http://errors.angularjs.org/1.5.8/$compile/multidir?p0=editableText&p1=&p2=ngRemoteValidate&p3=&p4=new%2Fisolated

Is it possible to use ng-remote-validate directive along with Angular-xeditable directive? If yes, please help me to solve this.

Thanks..

1

There are 1 answers

1
ARUN G On BEST ANSWER

add 'e' before your angular property

<a href="#" editable-text="vm.product.name" onaftersave="vm.updateProduct()"
e-ng-remote-validate="{{vm.pageUrl}}Product/IsUnique" e-dummy="{{vm.dummyName}}"
e-ng-remote-method="GET">{{vm.product.name || 'not set'}}</a>