Javascript is an incredibly powerful and expressive language. I find one of the best features of angular is it's insistence on using plain old javascript objects rather than requiring extending special classes or using framework-specific constructs in order to support it's two-way data binding model. This distinguishes angular from other frameworks such as Knockout. This really frees you to model your data however you see fit. Many people use models with just data and put listeners and handlers in the controllers, but there's nothing stopping you from enriching your model with functions and taking a more object-oriented approach.
Javascript makes it easy to intrduce behavior into any object, for example if you can do this:
So you could easily add behavior to your models, and you don't need any special framework to do it.
You are also free to bind handlers such as ng-click to a function that is defined on your model, for example, it is perfectly fine to do something like:
<ul>
<li ng-repeat='for person in people'> {{person.getFullName()}} <a href="" ng-click="person.doSomething()">Do Something</a></li>
</ul>
As far as your question about factories, unfortunately the angular team managed to cause quite a lot of confusion with how they chose to name factory/service/provider.These are just way to create SINGLETON services that can be shared and injected. A factory is run only once, and it has nothing to do with creating a factory that can be used to build multiple instances of any object, After running once, the single instance that it created will always be used to inject the same service instance.
You can,however feel free to create services for the purpose of adding behavior to your models. One posibility is creating services that abstract fetching particular models from the server. For example, it's quite common to use a repository pattern in your controller:
peopleRepository.getPersonById(5).then( function(person){
$scope.model = { myPerson: person };
});
The people repository could then be the perfect place to add additional behavior to objects returned from the server:
module.factory('peopleRepository', function($http){
return {
getPersonById: function(id){
return $http.get('/rest/api/persons/'+id).then(function(person){
person.getFullName = function(){
return this.firstName+ ' ' + this.lastName;
};
return person;
};
}
};
});
To summarize, angular really gets out of your way when it comes to dictating how you should structure your data models. You are free to use the full power of javascript to create rich domain models (if that's what you want to do).