0

Is there anyway I can use use ng-model within a transclusion of a directive?

I have posted the code here: http://plunker.no.de/edit/XWAUp7?live=preview

I look forward to somebody to give me advice.

pkozlowski.opensource
  • 116,891
  • 60
  • 324
  • 285
hllau
  • 8,871
  • 6
  • 28
  • 34

1 Answers1

0

It's because you're passing around a primitive type. If you use a reference type, like an object or an array, it will work a lot better. I've changed your plunk here this demo

Notice I had to pass an object into fOuter to make it work. Likewise, on fInner, if the primitive is the child of an object, it works both ways.

EDIT: Looks like Guillaume86 answered in the comments. Same answer, really.

Ben Lesh
  • 106,634
  • 47
  • 244
  • 231