plus-
plus-

Reputation: 46543

Angular resource, directive issue

I don't quite understand all the glue in Angular for custom directives,

I've made a sample directive here: http://plnkr.co/edit/OZjg6sUgl35GIriaabQg?p=preview

I'm expecting the ul list to grow but the show-card directive doesn't seem to work. I would expect the card.value to be displayed on each li.

What am I missing?

Upvotes: 1

Views: 202

Answers (1)

joakimbl
joakimbl

Reputation: 18081

When you define your directive you have to use camel case, so <show-card ...> will have the name .directive('showCard' ..., not .directive('show-card' ... (see http://docs.angularjs.org/guide/directive)

Upvotes: 3

Related Questions