The model is most often used in an architectural software template called Model-view-controller (MVC). You cannot understand how a model works without knowing the full picture. In this template, the web application is broken down into components to separate responsibilities. I will give you an example of the complete TODO code to see the real use of MVC. 
Model: take / process all domain data (most often you take it from the server). Here you create a transparent API that provides access to data that occurs with services. In the service, you get data from the server, you store it inside, and then you provide some functions that provide access, and when someone needs this data, he simply uses injection to access the service. Think of a service like a singlet data class, get / set, and other methods. Rule: if you do not know where something is happening, most likely it will serve. (FULL CODE)
.factory('api', function ($resource) { 'use strict'; var store = { //HERE IS THE API todos: [], api: $resource('/api/todos/:id', null, { update: { method:'PUT' } } ), clearCompleted: function ()[..] delete: function (todo)[..] get: function () [..] insert: function (todo)[..] put: function (todo)[..] }; return store; })
Controller: in the images above, you can easily see what the controller receives and does not give user interaction. Controllers do not manipulate Dom. The data here goes from the view (user) to the controller, using the area (or using this inside the controller), and then control the model using the functions that we get by entering the service (model). Many times we cite the controller as an intermediary that violates the MVC rule by querying the model and passing the result to the view, that is, another name for the MVP template. The rule is this: your controllers should always be as compact as possible ( FULL CODE )
.controller('TodoCtrl', function TodoCtrl($scope, $routeParams, $filter, store) { //store is the model, we make this in app.js //is the result of a factory we make up,and we named "api" var todos = $scope.todos = store.todos; [..] //in html we call removeTODO //<button class="destroy" ng-click="removeTodo(todo)"></button> //We use user interaction to manipulate the model! $scope.removeTodo = function (todo) { store.delete(todo);//we use the api we make }; [..]
View: as you can see in the image, the model updates the view, not the controller. How? With directives and filters. Be careful, a view has only a data view (data binding). They do not contain complex logic. I want to be clear, in MVC, the view must access the model directly. Directives and filters provide this feature. If you want to perform DOM manipulation, you must use the directive (not the controller). Note: we put the dom manipulation inside the compilation function and directive links, and not in the controller. ( FULL CODE1 FULL CODE2 )
I have a problem understanding the difference between $ scope and model object
A sphere is just a reference to a model, as we see, but not a model! The scope is also used to interact with the user, the controller depends on the scope, and the controller depends on the model.
so can i manipulate this list in a cached way (save it locally and update it sometimes)?
There are many ways to solve this problem. We regularly use the observer pattern, but in angular there is another way to do this, which is better in most cases. Here is an example:
angular .module("testApp", []) .service("myDataService", function(){ this.dataContainer = { valA : "car", valB : "bike" } }) .controller("testCtrl", [ "$scope", "myDataService", function($scope, myDataService){ $scope.data = function(){
For more information check out this one , there are some amazing answers.