AngularJS Developer Question:

Tell me when should you use an attribute versus an element?

Tweet Share WhatsApp

Answer:

Use an element when you are creating a component that is in control of the template. Use an attribute when you are decorating an existing element with new functionality.

This topic is important so developers can understand the several ways a directive can be used inside a view and when to use each way.

Download AngularJS Developer PDF Read All 125 AngularJS Developer Questions
Previous QuestionNext Question
What is ng-disabled directive?Explain me what is injector?