In my foray into AngularJS, I was a little embarrassed. The main reason for this is that I really did not quite understand what the model part of all this is. I mean, its MVC framework, so it should have models, right? So, I read a little about this. I tried reading this bit of documentation here .
I realized from this that the model aspect of the controller is that what was actually inside the $scope dictionary. Well, and that didn’t bother me until I read the evil trout blog post , one of the discourse creators.
What he was trying to overcome was that Angular did not have the right modeling scheme. I tried to find answers on SO, and I came across this . It was well read, but it really did not give me concrete examples of how to structure models in AngularJS.
I felt that this has really been lacking since then, I'm used to developing django, and clear models are useful. In emberjs, there seems to be a way to make models that inherit from the Ember class. Also, after reading the evil trout blog blog, I understand the potential pitfalls of having all the variables associated with the scope, and many of them are primitives, not objects.
So what is the best way to structure your model in AngularJS, so you may have supported code in the future. The main reason I stick with Angular is that it is very easy to write, but I'm afraid that it might turn out to be something like php, where functions are often crowded out for the sake of simplicity.
I hope I was able to pose my question, if not then, please feel free to leave a comment telling me how I can improve.