AngularJS Quiz App Tutorial (2/24) - Controller Properties and $scope

Publicado el: 02 marzo 2016
en el canal de: Hungry Turtle Code
14,827
102

The writeup for this video:
https://hungryturtlecode.com/code-pro...

The first part of this series can be found here:
   • Build An AngularJS Quiz App From Scra...  

The Git Repo for this project:
https://github.com/adiman9/HungryTurt...

In the second part of this series we will dive into some actual angular code. We take a look at how we can create variable or properties on our list controller and then use those in our html.

There are two common ways of doing this and I will explain both. The first method seems to be the most common within beginner tutorials which is using $scope.

$scope is a service object within Angular that allows you to bind properties to it and those properties will then be accessible from inside the HTML as long as you are within the html that that particular controller has control of.

The second method abstracts away the $scope service (although it is still running in the background) and I prefer this way as I feel it is more explicit. This method is known as the "controller as" syntax. In the video I explain why I prefer this method over $scope. But you should feel free to use either method.

Support Me On Patreon
  / hungryturtlecode  

One Off Donations:
PayPal - https://www.paypal.com/cgi-bin/webscr...
Credit / debit card - https://hungryturtlecode.com/donate

Bitcoin: 39iDX27ZSkYtRhUrH5r5YN128wEjwDmSYp
Ethereum: 0x38b3cBF8Ee3EeeeA33D1925bA0ce0e90c8EcFD46
Horizen (ZEN): znanBCHpWJecBwZZmft9r5QzbzRX4nQn6Dz

Check Out The Site!
https://hungryturtlecode.com/?utm_sou...

SUBSCRIBE!
http://www.youtube.com/hungryturtlede...

Join the Community!
Patreon -   / hungryturtlecode  
Follow Me --   / hungryturtledev  
Quora - https://www.quora.com/profile/Adrian-...
Like Me --   / hungryturtlecode  
linkedin --   / hungry-turtle-code  

Github (Personal) -- https://github.com/adiman9
Github (Hungry Turtle Code) -- https://github.com/HungryTurtleCode


En esta página del sitio puede ver el video en línea AngularJS Quiz App Tutorial (2/24) - Controller Properties and $scope de Duración hora minuto segunda en buena calidad , que subió el usuario Hungry Turtle Code 02 marzo 2016, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 14,827 veces y le gustó 102 a los espectadores. Disfruta viendo!