The Angular team are encouraging less use of the $scope object inside
controllers and leaning towards the `controller as` style, where you use
`this.user...`, since this makes you controllers even less reliant upon
Angular implementation details (i.e. scope) and is also more aligned with
how "component" directives are defined in Angualr 2.

On 22 June 2015 at 07:32, bargitta <[email protected]> wrote:

> Hi,
>
> Do you use $scope in your controller to setup variables that will be used
> in the html template?
> Or do you use this like this.user = {} in your UserController and ctrl as
> UserController, ctrl.user in the html template?
> What is the recommended way?
>
> --
> 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.

Reply via email to