Top "Angularjs-directive" questions

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

How to set focus on input field?

What is the 'Angular way' to set focus on input field in AngularJS? More specific requirements: When a Modal is …

angularjs angularjs-directive
What is the difference between '@' and '=' in directive scope in AngularJS?

I've read the AngularJS documentation on the topic carefully, and then fiddled around with a directive. Here's the fiddle. And …

angularjs angularjs-directive angularjs-scope isolated-scope
AngularJS ng-style with a conditional expression

I am handling my issue like this: ng-style="{ width: getTheValue() }" But to avoid having this function on the controller side, …

angularjs angularjs-directive
How to use a keypress event in AngularJS?

I want to catch the enter key press event on the textbox below. To make it more clear I am …

angularjs angularjs-directive angular-ui
How to call a method defined in an AngularJS directive?

I have a directive, here is the code : .directive('map', function() { return { restrict: 'E', replace: true, template: '<div&…

angularjs angularjs-directive
What is the best way to conditionally apply attributes in AngularJS?

I need to be able to add for example "contenteditable" to elements, based on a boolean variable on scope. Example …

angularjs angularjs-directive
How to access parent scope from within a custom directive *with own scope* in AngularJS?

I'm looking for any manner of accessing the "parent" scope within a directive. Any combination of scope, transclude, require, passing …

angularjs angularjs-directive
Angular2 - Input Field To Accept Only Numbers

In Angular 2, how can I mask an input field (textbox) such that it accepts only numbers and not alphabetical characters? …

html angular input angularjs-directive
How to set an iframe src attribute from a variable in AngularJS

I'm trying to set the src attribute of an iframe from a variable and I can't get it to work... …

javascript html angularjs iframe angularjs-directive
Confirmation dialog on ng-click - AngularJS

I am trying to setup a confirmation dialog on an ng-click using a custom angularjs directive: app.directive('ngConfirmClick', [ function(){ …

javascript angularjs angularjs-directive angularjs-scope