AngularJS Directives - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
AngularJS Directives

AngularJS Directives

AngularJS lets you extend HTML with new attributes called Directives.
AngularJS has a set of built-in directives which offers functionality to your applications.
AngularJS also lets you define your own directives.

AngularJS Directives

AngularJS directives are extended HTML attributes with the prefix ng-.
The ng-app directive initializes an AngularJS application.
The ng-init directive initializes application data.
The ng-model directive binds the value of HTML controls (input, select, textarea) to application data.

AngularJS Directives

DirectiveDescription
ng-appDefines the root element of an application.
ng-bindBinds the content of an HTML element to application data.
ng-bind-htmlBinds the innerHTML of an HTML element to application data, and also removes dangerous code from the HTML string.
ng-bind-templateSpecifies that the text content should be replaced with a template.
ng-blurSpecifies a behavior on blur events.
ng-changeSpecifies an expression to evaluate when content is being changed by the user.
ng-checkedSpecifies if an element is checked or not.
ng-classSpecifies CSS classes on HTML elements.
ng-class-evenSame as ng-class, but will only take effect on even rows.
ng-class-oddSame as ng-class, but will only take effect on odd rows.
ng-clickSpecifies an expression to evaluate when an element is being clicked.
ng-cloakPrevents flickering when your application is being loaded.
ng-controllerDefines the controller object for an application.
ng-copySpecifies a behavior on copy events.
ng-cspChanges the content security policy.
ng-cutSpecifies a behavior on cut events.
ng-dblclickSpecifies a behavior on double-click events.
ng-disabledSpecifies if an element is disabled or not.
ng-focusSpecifies a behavior on focus events.
ng-formSpecifies an HTML form to inherit controls from.
ng-hideHides or shows HTML elements.
ng-hrefSpecifies a url for the <a> element.
ng-ifRemoves the HTML element if a condition is false.
ng-includeIncludes HTML in an application.
ng-initDefines initial values for an application.
ng-jqSpecifies that the application must use a library, like jQuery.
ng-keydownSpecifies a behavior on keydown events.
ng-keypressSpecifies a behavior on keypress events.
ng-keyupSpecifies a behavior on keyup events.
ng-listConverts text into a list (array).
ng-maxlengthSpecifies the maximum number of characters allowed in the input field.
ng-minlengthSpecifies the minimum number of characters allowed in the input field.
ng-modelBinds the value of HTML controls to application data.
ng-model-optionsSpecifies how updates in the model are done.
ng-mousedownSpecifies a behavior on mousedown events.
ng-mouseenterSpecifies a behavior on mouseenter events.
ng-mouseleaveSpecifies a behavior on mouseleave events.
ng-mousemoveSpecifies a behavior on mousemove events.
ng-mouseoverSpecifies a behavior on mouseover events.
ng-mouseupSpecifies a behavior on mouseup events.
ng-non-bindableSpecifies that no data binding can happen in this element, or its children.
ng-openSpecifies the open attribute of an element.
ng-optionsSpecifies <options> in a <select> list.
ng-pasteSpecifies a behavior on paste events.
ng-pluralizeSpecifies a message to display according to en-us localization rules.
ng-readonlySpecifies the readonly attribute of an element.
ng-repeatDefines a template for each data in a collection.
ng-requiredSpecifies the required attribute of an element.
ng-selectedSpecifies the selected attribute of an element.
ng-showShows or hides HTML elements.
ng-srcSpecifies the src attribute for the <img> element.
ng-srcsetSpecifies the srcset attribute for the <img> element.
ng-styleSpecifies the style attribute for an element.
ng-submitSpecifies expressions to run on onsubmit events.
ng-switchSpecifies a condition that will be used to show/hide child elements.
ng-transcludeSpecifies a point to insert transcluded elements.
ng-valueSpecifies the value of an input element.


AngularJS Directives on HTML Elements

AngularJS modifies the default behavior of some HTML elements.
ElementDescription
aAngularJS modifies the <a> element's default behaviors.
formAngularJS modifies the <form> element's default behaviors.
inputAngularJS modifies the <input> element's default behaviors.
scriptAngularJS modifies the <script> element's default behaviors.
selectAngularJS modifies the <select> element's default behaviors.
textareaAngularJS modifies the <textarea> element's default behaviors.

About Mariano

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.