Hello, I'm a newbie at Node and Angular. I'm currently stumbling upon this
problem:
Let's say the response from my Node server is an array of JSONs, like this:
students = [{"name" : "John Doe", "ID" : "12345", "major" : "math"},
{"name" : "Jame Smith", "ID" : "23456", "major" : "CS"},
{"name" : "Joe Green", "ID" : "34567", "major" : "EE"}]
In order to render this result using Angular, I would need the students
array to be inserted in the Angular ng-init directive:
<div *ng-init*="students=[
{"name" : "John Doe", "ID" : "12345",
"major" : "math"},
{"name" : "Jame Smith", "ID" :
"23456", "major" : "CS"},
{"name" : "Joe Green", "ID" : "34567",
"major" : "EE"}
];">
...
</div>
How can I achieve this ? Alternatively, if there is a better way to make
Angular pick up the result that Node delivers, and continues with the
rendering, please let me know. Many thanks!
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/d7616b2f-56df-477d-b9f9-2270bfac6a06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.