Nilesh Gajare
Nilesh Gajare

Reputation: 6398

Calling custom directive in angular js

I want to do something like that, Can it be possible in angularjs

ng-change=\"myDirective = [test]\"

i.e. I simply want to call my directive on ng-change , is it possible in angularjs to call custom directive inside directive.

Upvotes: 0

Views: 48

Answers (1)

Poyraz Yilmaz
Poyraz Yilmaz

Reputation: 5857

yes it is possible but for doing this you need another directive for watching changes on your myDirective variable...

when you change value of myDirective middleware directive catches changes and rebuild dom.

I created such a directive for another problem but it can be used in your situation so I edit this PLUNKER for you...

Upvotes: 1

Related Questions