Top "Angularjs-directive" questions

AngularJS directives are a way to teach HTML new tricks by extending the HTML vocabulary.

Link vs compile vs controller

When you create a directive, you can put code into the compiler, the link function or the controller. In the …

angularjs angularjs-directive
How to set bootstrap navbar active class with Angular JS?

If I have a navbar in bootstrap with the items Home | About | Contact How do I set the active class …

javascript twitter-bootstrap angularjs angularjs-directive navbar
get original element from ng-click

I have a list of items in my view with ng-click attached to them: <ul id="team-filters"> <…

angularjs angularjs-directive
How to allow only a number (digits and decimal point) to be typed in an input?

I am new to angularjs. I am wondering what is the way to allow only a valid number typed into …

angularjs angularjs-directive
When to favor ng-if vs. ng-show/ng-hide?

I understand that ng-show and ng-hide affect the class set on an element and that ng-if controls whether an element …

angularjs angularjs-directive
Angularjs dynamic ng-pattern validation

I have a form that if a checkbox is false enforces validation on a text input using the ng-required directive. …

angularjs angularjs-directive angularjs-ng-change
How to validate email id in angularJs using ng-pattern

Am trying to validate an Email id field in angularJs using ng-pattern directive. But am new to AngularJs. I need …

regex angularjs email angularjs-directive ng-pattern
Easiest way to pass an AngularJS scope variable from directive to controller?

What is the easiest way to pass an AngularJS scope variable from directive to controller? All of the examples that …

angularjs angularjs-directive ng-controller
How do I restrict an input to only accept numbers?

I am using ngChange in AngularJS to trigger a custom function that will remove any letters the user adds to …

javascript angularjs angularjs-directive
Angular.js directive dynamic templateURL

I have a custom tag in a routeProvider template that that calls for a directive template. The version attribute will …

angularjs angularjs-directive