16 questions
0 votes
0 answers
90 views
Making an AngularJS download directive that is reusuable in multiple views
I'm new to AngularJS and this is my first attempt in creating a custom directive. I found that the same piece of code for downloading a file was used in multiple places so I want to create a directive ...
1 vote
1 answer
547 views
how to get ng-model value in directive
I have written a directive in AngularJS, and used the input type number with min-max and ng-model attribute. I have used isolated scope. In the directive, I have written a blur event. I am getting min-...
0 votes
1 answer
27 views
isolated scope data not displaying in directive template
I am building a custom Angular directive to display pagination across my application. I'm using isolated scope to pass totalNoOfRecords but it's not getting displayed. Any help will be appreciated ...
1 vote
0 answers
51 views
AngularJs same directive for multiple Element, how to change a Isolated scope value
Iam using a directive to form a select element, repeating the json and forming select for each element. Now change of first dropdown1 i need to change the allowed_values of dropdown2. My sample Code. ...
0 votes
0 answers
26 views
Isolated scope built in directives in angularjs
I was reading about the isolated scopes in AngularJs. I was wondering that are there any built-in directives in AngularJs that uses isolated scope. Could you please provide some useful link or mention ...
0 votes
2 answers
59 views
Calling function of controller from directive when using isolated scope?
I want to call a function of Controller from Directive, It is for validation. But i'm a bit confused about how to call it from Directive when i'm using isolated scope. Here is the code of directive:- ...
0 votes
1 answer
301 views
How can we pass variable in isolated scope function [duplicate]
I have a directive like below - <div data-my-param-control data-save-me="saveMe()"></div> In directive controller, I bind saveMe() function from controller with isolated scope & like ...
1 vote
1 answer
112 views
why $scope.info binding late on ng-change in custom directive
tag: <grid-filter varible="info.M_id" on-change="searchMember()"> </grid-filter> directive app.directive("gridFilter", function () { return { scope: { varible: "=", onChange: "&...
0 votes
0 answers
30 views
Can the local scope property and the passed in attribute value be used interchangeably in angularjs directives with isolate scope
I'm following Dan Wahlin isolate scope with function parameters. I have a couple of ambiguity in this article. Since there is no response at that site, I opted for stack overflow. I'm new to the ...
0 votes
0 answers
62 views
call a directive function from controller without isolated scope
Is there a way of calling a function defined in a directive from the parent controller without using isolated scope or events?
0 votes
2 answers
127 views
Is there any way to use controller scope variable in isolated scope without defining in html/jsp
Below is the code illustrating the isolated scope scenario. directivesModule.controller('CustomersController', ['$scope', function ($scope) { var counter = 0; $scope.customer = { ...
0 votes
3 answers
371 views
AngularJS - Pass value from isolated scope directive to another element
Is there a way to pass a boolean value (dataLoading) from an isolated scope directive to another element to show a progress bar when data is loading during login operations? index.html <div class=...
1 vote
2 answers
144 views
In AngularJS, if the child directive cannot access it's immediate parent's scope then would it inherit its nearest, non-isolated ancestor's scope?
I have two examples in favor of the above statement - 1) When using $scope (http://plnkr.co/edit/kFM77mVReS7AUwZsNzCV?p=preview) - <!DOCTYPE html> <html> <head> <script ...
1 vote
2 answers
4k views
How to bind ng-click to a custom directive and call a parent function?
We are using Angular 1.4.2 and I am trying to take a count value from a directive using ng-click, pass it to a function, then pass it up to the parent controller. After some effort it is working in a ...
112 votes
2 answers
51k views
AngularJS : Differences among = & @ in directive scope? [duplicate]
Creating an isolate scope inside a directive lets us map the outer scope to the inner scope. We have seen six different ways to map to attrbutes: =attr &attr @attr = & @ What do each of these ...