Top "Angularjs-directive" questions

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

Bind class toggle to window scroll event

When a user scrolls their browser window below a certain point, I am toggling the class of the #page div. …

angularjs angularjs-directive
In Angular, how to pass JSON object/array into directive?

Currently, my app has a controller that takes in a JSON file then iterates through them using "ng-repeat". This is …

javascript json angularjs angularjs-directive angularjs-ng-repeat
Call method in directive controller from other controller

I have a directive that has its own controller. See the below code: var popdown = angular.module('xModules',[]); popdown.directive(…

javascript jquery angularjs angularjs-directive
Select text on input focus

I have a text input. When the input receives focus I want to select the text inside of the input. …

angularjs angularjs-directive
Binding variables from Service/Factory to Controllers

I have a variable that will be used by one or more Controllers, changed by Services. In that case, I've …

angularjs angularjs-directive
Call a controller function from a directive without isolated scope in AngularJS

I cannot seem to find a way to call a function on the parent scope from within a directive without …

angularjs angularjs-directive angularjs-scope
Using angularjs filter in input element

I hope I haven't missed anything obvious in the doco, if I have I'm sure someone will help. I'm using …

angularjs asp.net-web-api angularjs-directive
Why can't the $rootScope be accessed in the template of a directive with isolate scope?

With isolate scope the template of the directive does not seem to be able to access the controller ('Ctrl') $rootScope …

javascript angularjs angularjs-directive
Conditionally adding data-attribute in Angular directive template

I'm working on the template for a directive. If a property in the scope is set to true, data-toggle="dropdown" …

angularjs angularjs-directive
Angularjs - $rootScope in directive link function

I am asking this question because I am not quite clear on how to think of rootscope as a dependency …

angularjs angularjs-directive angularjs-scope rootscope