Home › Forums › JavaScript › Angular Directives › Reply To: Angular Directives
April 10, 2015 at 5:07 pm
#200222
Participant
am I completely misunderstanding this
Nope, you got it — it’s called attribute normalization
.
So Angular will strip these and convert them to camelCase
.
app-info
, becomesappInfo
x-app-info
, becomesappInfo
data-app-info
, becomesappInfo
You can also use:
app:info
orapp_info
, all of these will be converted or normalized
You just need to decide what convention you wish to use, Angular doesn’t make any assumptions, it tries to make everyone happy.
See Angular Documentation (scroll to Normalization)