StudyGPT Just Leveled Up – Say Hello to Knowee! 🚀
Knowee
Questions
Features
Study Tools

Which of the following can be used as a prefix for Directive?*a) data-b) ng-c) All of the mentionedd) None of the mentioned

Question

🧐 Not the exact question you are looking for?Go ask a question

Solution

The correct answer is c) All of the mentioned.

In AngularJS, both "data-" and "ng-" can be used as prefixes for directives.

Here's a step-by-step explanation:

  1. "data-" prefix: This is a HTML5 specification for custom attributes. When you use this prefix, your HTML will be valid and it will pass HTML5 validation tests.

  2. "ng-" prefix: This is a default AngularJS prefix. AngularJS directives like ng-bind, ng-model, etc., all use this prefix.

So, both "data-" and "ng-" can be used as prefixes for AngularJS directives. Therefore, the answer is c) All of the mentioned.

This problem has been solved

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.