<app-info> Where does it come from?


#1

I understand everything so far and completed this step, but I can't grasp where app-info comes from and how it links to (is a directive for) the apps?

Can somebody please help me understand. Thanks in advance.

<div class="card"> 
  <app-info info="move"></app-info> 
</div>

#2

I was reading up on it in some other forums and apparently it has to do with Normalization.

Angular is case sensitive (i.e. appInfo) and HTML is not case sensitive so we add the hyphen to normalize it.

appInfo in angular is equal to app-info in HTML.

Can somebody verify if this is correct? Thanks.


#3

Thank you for your answer. It quite clarifies my concern.


#4

Thanks, I was racking my brain trying to figure out where app-info came from.

I tested that this is indeed the case by changing the name of the directive inside of appInfo.js to appIn and changing
the tag in the view to <app-in></app-in> and it worked!


#5

Thanks for posting this since it threw me off as well. Documentation for this appears to be at https://docs.angularjs.org/guide/directive down in the Matching Directives and Normalization sections.