0

I'm creating a font picker directive with angularjs for an Umbraco property editor.

In the directive I have a select with the fonts, which is bound to the isolated scope.

If I have two directives on the same page, and I change the selected font in one of them, the other one changes too.

How come? and how do i fix it?

tobi_dk
  • 33
  • 1
  • 1
  • 5
  • The problem seems to be that both selects binds to the same variable instead of having one variable per select. Can you show some code? – Polmonite Mar 28 '14 at 08:51

1 Answers1

0

hmmm...figured it out

when i initialized my scope i used the same json string on both variables that was used for binding the directives. Apparently the two scope variables were the same...

not my proudest day...

tobi_dk
  • 33
  • 1
  • 1
  • 5