Just to add to Andras, 'M' could also be the prototype based modal [e.g.
user, entity, pojo], you can declare via $service or a $factory for a
state-full API and methods used and shared in your angularjs application.

On Fri, Oct 30, 2015 at 9:25 AM, András Csányi <[email protected]>
wrote:

> Hi,
>
> The statement, everything is stuffed into the controller can be true, but
> if you walk this way you will find yourself in the situation where you have
> not testable code. I did it, and it is not a good feeling. :)
>
> The purpose of the controller is controlling the interaction between the
> viewmodel and the business logic. The latter should be stored in services.
> Business logic should not be in the controller. To separate the business
> logic from the controller and put them into services sounds easy at first,
> but it requires a way of thinking.
>
> Answering for your question, there is M in angular, this is the $scope if
> you use scope, or the vm variable if you use the vm syntax.
>
> If I'm wrong then there are more clever people here than I'm and they are
> going to correct my mistakes. ;)
>
> - -
> --  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
> http://facebook.com/andras.csanyi
> --  ""Trust in God and keep your gunpowder dry!" - Cromwell
>
> On 30 October 2015 at 14:13, Steven Ottz <[email protected]> wrote:
>
>> I am learning Angular.js and I found this also with Laravel.
>>
>> Where is the M in MVC...It looks like everything gets stuffed into the
>> controller?
>>
>> Am I wrong?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "AngularJS" 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].
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" 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].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Rishi Tandon*
Pearson Learning Technology Group

Mobile: (310) 926-9032

Pearson
Always Learning
Learn more at www.pearson.com

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" 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].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to