I have a simple directive myMonkey, which sets a image based on the

which is used twice in a page.

  <my-monkey></my-monkey>
  <my-monkey sad></my-monkey>

Angular shows two sad monkeys...but it should show a happy and a unhappy
one.

if we comment out the "<my-monkey sad></my-monkey>", a lucky monkey is
being shown.

if we change the order to

  <my-monkey sad></my-monkey>
  <my-monkey></my-monkey>

then two lucky monkeys are being shown.

What am I doing wrong?

See my plunker for the example:

http://plnkr.co/edit/fYBOJNnpV1EJv6AxSWXo?p=preview

BTW. Yes, we really have a monkey directive in our production code ;)

​Greetz B.​

-- 

Bernhard Rode
M.Sc. (Master of Computer Science and Media)

fon +49.171.5629409
mail [email protected]
twitter @ebbo

google+ *google.com/+BernhardRode <http://www.google.com/+BernhardRode>*
twitter twitter.com/ebbo
facebook facebook.com/bernhard.rode

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to