Thanks for all your answers,

I asked this question because sometimes I see sample code
with the keyword 'this' used for non-scope variables.



2014/1/9 Sander Elias <[email protected]>

> Hi All,
>
> Ok, maybe I’m weird, but doesn’t anybody see the obvious bug in here ;)
>
> function controller( $scope ){
>    $scope.var;
>    var myvar = 'Hello world';
>    function myfunction(){
>        alert(myvar);  // <----- I assume this is the needed code for this 
> brilliant piece!!
>    }
>  }
>
> On a serious note,
> Yeah, this is perfectly valid, and I my opinion preferable above putting
> everything on the $scope!
>
> Regards
> Sander
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/PyXtGO2R-HA/unsubscribe.
> To unsubscribe from this group and all its topics, 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/groups/opt_out.
>



-- 
JAKE KWON +1 (604) 655 3109
email: [email protected]

-- 
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/groups/opt_out.

Reply via email to