Questions tagged [one-time-binding]
20 questions
9
votes
1 answer
One time binding not working with function
I have an Angular function where i log a value
$scope.getFormattedDate = function(date){
console.log(date)
}
and here in the html code
span {{::getFormattedDate('hello')}}
According to this the value should get rendered once and never again.…

Anubhav
- 7,138
- 5
- 21
- 33
7
votes
2 answers
Angular Translate not translating sometimes with one-time binding
I am using Angular 1.x and it's Angular Translate module. Recently, I switched all my translation bindings from two-way to one-time. Everything worked fine, until one day, however, I noticed that sometimes if I started refreshing the page, the…

Yulian
- 6,262
- 10
- 65
- 92
3
votes
0 answers
Angular: one-time-binding for ngClass with multiple values
I would like to use one-time binding for the following situation
....
If I would like to use one-time binding for the whole expression I know you can do

Jeanluca Scaljeri
- 26,343
- 56
- 205
- 333
3
votes
1 answer
AngularJs one time binding and order of values with boolean operators
What impact does the order in which boolean operators are declared have?
Controller:
$scope.show = false;
$scope.clickMe = function() {
$scope.show = true;
$scope.name = 'Name defined'
};
Template:

Jimmy
- 428
- 5
- 19
2
votes
1 answer
I wonder if this really is the correct way to use onAuthStateChanged
Following this react-firestore-tutorial
and the GitHub code. I wonder if the following is correct way to use the onAuthStateChanged or if I have understod this incorrect I'm just confused if this is the right way.
CodeSandBox fully connect with a…

Kid
- 1,869
- 3
- 19
- 48
2
votes
2 answers
Ng-repeat one-time binding and "track by" change
Our web app uses ngRepeat to display a list of items. The array and its objects are never changed, but values of the objects inside can be modified by the user.
We generate a unique trackId's for each item. This trackId is updated every time the…

Steve Fisher
- 41
- 3
2
votes
1 answer
Angular one time binding ng-if multiple conditions
In my templates i've got a lot of conditions related to my user rights and products rights, for example:
Thoses rights can't be changed without…

user2283958
- 115
- 2
- 8
2
votes
2 answers
Angular One-time bind conditionally OR unbind listener when a specific value is set
I've something like below in DOM:
And in controller:
$scope.variant = false;
// after some unknown time there may be:
$scope.variant = true;
I wanted to show that div when variant…

Asim K T
- 16,864
- 10
- 77
- 99
2
votes
2 answers
What is the syntax of angular one time binding for multiple properties in ng-if
I have an
ng-if="dc.emailNotificationSchedule.progressInterval === dc.SkillCompletionProgressIntervals.NEVER_LOGGED_IN".
What i want to do is to have one time bindings for both variables in ng-if. But when i try to use…

Suren Aznauryan
- 984
- 10
- 24
1
vote
1 answer
Interpolate a one-time binding manually
How could I interpolate a one-time binding manually?
Here is my use case.
I have a list of a lot of elements. The elements just sets of controls. I get the data for the elements from the BE. Then I would like to leverage the AngularJS interpolation…

hellouworld
- 525
- 6
- 15
1
vote
1 answer
One time binding directive not working with Angular 4
I'm trying to implement a directive to implement the one time binding so when I use this directive I want to use the one time binding.
I made this example; https://stackblitz.com/edit/angular-bhayzy
In my HTML I have:
message:…

Nammen8
- 619
- 1
- 11
- 31
1
vote
2 answers
How to change one-time binding data in AngularJS?
I have a div which show details like mobilenumber, name etc. like {{::mobilenumber}}, {{::name}}
In that div, there is a button that renders the same values in the new form
By using the button in the form, the user can change the values but in the…

VIKAS KOHLI
- 8,164
- 4
- 50
- 61
0
votes
1 answer
One time binding called infinitely many times. Why?
One time binding does not work in AngularJS. Why?
Here is the piece of code:

hellouworld
- 525
- 6
- 15
0
votes
1 answer
is mixing one time with one way binding in Angualrjs possible inside ng-if?
I'm using latest AngluarJS release,
I was wondering if I can combine one time with one way binding in one expression inside ng-if directive , some like that:
ng-if="(vm.isUnix) && (::vm.isGnsEnabled)"
The line above throws an error, not working

nadavgam
- 2,014
- 5
- 20
- 48
0
votes
1 answer
ng-repeat one-time binding inheritance?
If I have an ng-repeat directive iterating through a list of lists via a one-time binding, does a nested ng-repeat through each of the inner lists also need a one-time binding, or is that redundant?

Sam Claus
- 1,807
- 23
- 39