-
Notifications
You must be signed in to change notification settings - Fork 27.6k
AngularJs binding issues with inner JSON object #15744 #15886
Comments
This is not a bug, your code looks incorrect to me. By having a quick look, the following has to be changed:
This has to be changed to
Next you need to put all elements with a binding on
This doesn't look like a bug, but a general support question. Please keep in mind that Github issues are reserved for bugs and feature requests. |
Thanks @frederikprijck for answering this! |
So Can't it be done with one ng-repeat?? |
@imzubair10 No, your second |
Thanks corrected now but problem is still same.
There are couple of issues here i am facing. What i wanted to do is Looks like if employeeList is empty then it does'nt go inside creating div and span which is understood. To address this is there a better way to do something like this. and if condition does'nt work properly it displays both values so else is always present if (if) is true |
Hey @imzubair10, there's plenty of people who're willing to help you over at the channels mentioned at the bottom here. Feel free to ping me over at gitter (https://gitter.im/angular/angular.js) with a reproduction sample (plunkr) and I'll be happy have a look. |
@frederikprijck i've shared plunker on gitter (https://gitter.im/angular/angular.js) |
I'm submitting a ... (check one with "x")
Current behavior
Trying to bind json object to the html elements in a webpage. Json returned objects have inner objects as well which is sometimes null as well. If crtain property is null then i still need to show div but with some hard coded values which i am trying to do with ng-if. But it does'nt work for me whereever i use ng-if these are binding from the returned inner employeeList object. Please suggest if two ng-repeats will be used here and ng-if is applicable here??
Expected behavior
The expected result should be to show all the html elements if certain property is absent from the inner object then the else condition should be visible. (else condition here means ng-if where condition is (!=)).
HTML Code
JSON
What is the motivation / use case for changing the behavior?
It's a requirement
Please tell us about your environment:
Java with AngularJS.
ES5
node --version
=The text was updated successfully, but these errors were encountered: