Angular JS directives

I read angular JS directives are called in 4 ways as below…

Then why this ng-model directive not following in any of the 4 ways ?

It is, it’s an attribute.

but it says ng-model directive!

Well yes, ng-model is a directive, declared on an input element in the above case. BTW, is there a specific reason why you are learning angular from that w3schools site rather than with the official docs? I mean, the documentation is really extensive – e.g. have a look here for a thorough explanation of directives.

Unless you need to learn Angular 1.x for a specific reason (e.g. supporting legacy apps) then there’s little reason to learn it now. You’d be better off with one of the newer frameworks. I often hear people referring to Vue.js as a good replacement to Angular 1.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.