Angular JS directives

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

https://content.screencast.com/users/curseofgoldendragon/folders/Jing/media/5eb995ac-cdee-4e79-8596-f914b54a438c/2017-05-14_2138.png

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

https://content.screencast.com/users/curseofgoldendragon/folders/Jing/media/29015105-bcd7-4da7-bb5e-4d534e832cb8/2017-05-14_2141.png

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.