AngularJS questions involving isolate scope directives
Questions tagged [isolated-scope]
16 questions
1106
votes
18 answers
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 here are some relevant snippets:
From the HTML:
{{text}}
From the pane…

iwein
- 25,788
- 10
- 70
- 111
112
votes
2 answers
AngularJS : Differences among = & @ in directive scope?
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 scope mapping options do?

Shaun Luttin
- 133,272
- 81
- 405
- 467
1
vote
1 answer
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-max value but not getting ng-model value:…

Rohit Hushare
- 61
- 7
1
vote
0 answers
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.

Sridhar
- 73
- 1
- 11
1
vote
1 answer
why $scope.info binding late on ng-change in custom directive
tag:
directive
app.directive("gridFilter", function () {
return {
scope: {
varible: "=",
onChange: "&"
},
template: [
'

anil singh butola
- 119
- 2
- 12
1
vote
2 answers
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) -
…

Rachit Belwariar
- 47
- 1
- 8
1
vote
2 answers
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 plunker, but unfortunately when I tried to move…

James Drinkard
- 15,342
- 16
- 114
- 137
0
votes
0 answers
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 to improve modularity. Here's is my first…

Francis.Tricka
- 15
- 7
0
votes
1 answer
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
Here's my code what I tried so far
Template where…

Shashank
- 437
- 2
- 6
- 21
0
votes
0 answers
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 some names if anyone came across such…

Mohit
- 522
- 4
- 10
0
votes
2 answers
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:-
App.directive('test',function(){
return{
…

ahsan ayub
- 286
- 2
- 17
0
votes
1 answer
How can we pass variable in isolated scope function
I have a directive like below -
In directive controller, I bind saveMe() function from controller with isolated scope & like below -
function MyParamControlDirective($filter,
…

s.jain
- 13
- 5
0
votes
0 answers
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 javascript/angular world, response in detail is…

Raida Adn
- 405
- 1
- 6
- 17
0
votes
0 answers
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?

Sapna Dhalor
- 86
- 1
- 8
0
votes
2 answers
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 = {
name: 'David',
street: '1234 Anywhere…

sandiee
- 153
- 1
- 8