Questions tagged [angularjs-bindings]

66 questions
14
votes
3 answers

Angular 1.5 Component Bindings: Check if Callback is Present

I've got a simple contactList component, which has 2 bindings: contacts and onRemove. contacts is just an array of contacts to display onRemove is a callback function app .component('contactList', { template: `
8
votes
1 answer

Angularjs: why there are 3 watchers for 1 binding?

Please take a look at the screenshot given below As you can see in the screenshot above there are #3 watchers for a single binding. Can anyone please elaborate why is it so? P.S: I am using AngularJS Batarang for checking the performance. var app…
Vikas Bansal
  • 10,662
  • 14
  • 58
  • 100
6
votes
7 answers

Change in value of scope variable is not getting reflected in my string

I have below string : "/root/get"; Now I am generating a query string in above string with 1 scope variable but problem is when the value of that variable change then that new value is not getting update in my URL automatically. You can see in…
4
votes
1 answer

ng-table inside a custom directive error "Cannot set property '$data' of null"

here my question: I am trying to build a directive in angular, which would use an ng-table inside. The problem is that input parameter tableData is initialized as an empty array initially because it is set from the outside of the directive when the…
4
votes
1 answer

How does angular binding happen?

Below is my understanding of how binding happens in angularJS. Would be great if experts can provide feedback/comment..
{{myvar}} {{anothervar}}
$scope.watch( function (scope) { return scope.anothervar; …
noi.m
  • 3,070
  • 5
  • 34
  • 57
3
votes
1 answer

How to send data from the Component to the parent in AngularJS 1.x

I have two tabs as a component, which contains some input field, when I press the SAVE button I want to get the value of them and save it to the server. The problem is SAVE function is in the index.js (parent) and the Input fields are in the…
3
votes
2 answers

Broadcast not received in directive

I have a parent-child controller relationship between my
,
and as such:
3
votes
1 answer

Which parts does two way binding updates?

Assume I have the following array in the controller with SortBy model. var empsColl = [ { 'firstName': 'Donney', 'gender': 'male', DOB:new Date("November 20, 1978"), salary1:12000, salary2:12000 }, { 'firstName': 'Obama', 'gender':…
pyykke dasher
  • 41
  • 1
  • 10
3
votes
2 answers

Angularjs not updating variables

I want to display/update the calculation answer directly without the need of aditional buttons. Or do i need a function and button to apply the changes?
A_Number:
3
votes
3 answers

Angular2 decorator for 2 way property binding

From Victor Savkin's post on Angular2 template syntax, shows how to use input and output property binding - @Component({selector: 'todo-cmp'}) class TodoCmp { @Input()…
tyrion
  • 714
  • 2
  • 7
  • 27
3
votes
1 answer

AngularJS Factory variable value assignment breaks binding

It seems that when I assign a new value to a variable in my service/factory it breaks the binding and the controller stops updating the value UNLESS I call the $scope.verify function in my controller which merely prints the service object to the…
2
votes
1 answer

Dynamic elements and scope variables not available in the $http success function block

I am calling a $http get method and in the success callback, the response that I get, based on that response, in the html, am doing an ng-repeat to iterate over the elements. Also, am maintaining the ids of some divs dynamically based on the $index…
Ori
  • 55
  • 1
  • 1
  • 9
2
votes
0 answers

How to validate form in AngularJS 1.x component

I have a form that its fields are inside the component. Now I want to validate the fields. The problem is, my messages don't show up. also the pattern doesn't have any effects. I tried to fix it with help of this post, but no success. Does someone…
GeoCom
  • 1,290
  • 2
  • 12
  • 33
2
votes
1 answer

AngularJS – Subtract two-way bind from one-time bind

In my Angular 1.4.8 app I want to calculate the difference between an original value and the value after it has been changed by the user.
Value Difference
{{…
2
votes
2 answers

ng-non-bindable only for the content of the element

In our Angular application, we have a link that is filled with user content on server side. So we need to tell Angular not to interpret that link content. Otherwise, if the user, or an attacker puts Angular binding expressions in there (say…
1
2 3 4 5