Now the best part is that you're probably fetching this from the database so you could just fetch json from the server and pass that to the model like so:
// main.js
$.getJSON('/person/find/1').then(function(person) {
$scope.person = person
})
The best part of using the Model View paradigm is that you can add models/fields with minimal changes to the code. Just add that to your backend and your view and you're good to go.
1
u/2Punx2Furious Jun 09 '16
Could you please expland on these a bit more? I did the Angular course on codecademy, but at the end of it I was very confused.
What's model and view? What is routing?