M
M
Maxim Vasiliev2014-11-19 23:30:22
Angular
Maxim Vasiliev, 2014-11-19 23:30:22

How to do two way binding in angularjs directive?

I want the same functionality that it does with an isolated context.
scope: { foo: '=attribute' }
How can I do this without isolation?
Upd: in general, already pofik.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2014-11-19
Protko @Fesor

which one does with the isolated context

I have a feeling that sometimes questions from foreign resources are posted here, passed through Google translate.
Well, do not isolate the scope, and then you will be given the parent one. Although I will say right away that the idea is bad. Do you understand why isolated scopes were invented at all?

M
Mikhail Osher, 2014-11-19
@miraage

I will say that the idea is not the best.
But, look towards using the $parse service in the compile function and return a link function from it, in which you hang watcher....

E
Ekaterina, 2014-11-20
@sferrka

Use an object with properties and change the property in the directive

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question