Questions tagged [ng-bind]

The ngBind attribute tells Angular to replace the text content of the specified HTML element with the value of a given expression, and to update the text content when the value of that expression changes. Typically, you don't use ngBind directly, but instead you use the double curly markup like {{ expression }} which is similar but less verbose.

Source: http://docs.angularjs.org/api/ng.directive:ngBind

The ngBind attribute tells Angular to replace the text content of the specified HTML element with the value of a given expression, and to update the text content when the value of that expression changes.

Typically, you don't use ngBind directly, but instead you use the double curly markup like {{ expression }} which is similar but less verbose.

It is preferrable to use ngBind instead of {{ expression }} when a template is momentarily displayed by the browser in its raw state before Angular compiles it. Since ngBind is an element attribute, it makes the bindings invisible to the user while the page is loading.

An alternative solution to this problem would be using the ngCloak directive.

Usage

as attribute

<ANY ng-bind="{expression}">
   ...
</ANY>

as class

<ANY class="ng-bind: {expression};">
   ...
</ANY>
  • Parameters

    ngBind – {expression} – Expression to evaluate.

183 questions
-1
votes
2 answers

AngularJS and Jquery: angular dosen't bind on jquery navigation

Jquery is ignoring all Angular ng binds(ng-app,ng-controller,ng-bind..) on page change.They are working in index but when I navigate to other pages ng-s just aren't working.Is there a way to "rebind" angular when page dynamically changes? in first…
Axon
  • 251
  • 1
  • 2
  • 9
-1
votes
1 answer

Angular js binding to an element with specific id inside a collection

lets say i have 2 collections var products = [{Name : "p1", Id : 1}, {Name : "p2", id : 2}]; var locSales = [ {LocName : "Loc1", Sales : [{Id : 1, Value : 23}, {Id : 2, Value : 54}]} {LocName : "Loc2", Sales : [{Id : 1, Value : 78}, {Id : 2, Value…
Parv Sharma
  • 12,581
  • 4
  • 48
  • 80
-4
votes
1 answer

angularjs , any idea how to include "" in ng-bind=""

any idea how to put>> phoneNo["phoneno"] in html input using ng-bind angular?? phoneNo["phoneno"] can display if use {{phoneNo["phoneno"]}}, but it turn to syntax error when i put
Patrick
  • 13
  • 2
1 2 3
12
13