Codecademy AngularJS tutorial solution Part 3 Workflow .1Adding a new product to $scope$scope helps the controller passes data to the view. We are storing an object of key value pairs into the $scope.product variable. Single word keys like name and price don't need quotation marks, but regardless of the length and construct of the string, quotes are needed when storing values hence the book name is surrounded by quotes. However, we don't need quotes when storing numbers, hence 19 doesn't have quotes around.Codecademy AngularJS tutorial solution Part 3 Workflow .2 .3Displaying book title and priceIf we just write product.name nothing will happen. HTML will literally display things exactly how it is. Because when the words are surrounded by double curly braces {{ }} AngularJS is smart enough to know to take a look. Rather than display as it is, it will traverse upward in the HTML code to see where it should be looking for useful data. It found that somewhere upward, it is told to look at the MainController, so it checks if there's a product property or variable stored in the $scope object. Found! Then it checks if there's .name and .price property. Found! AngularJS is able to successfully display the data. If we change the data now to {name : "My book", price: 25}. We no longer have to change HTML code. It was a one time setup. This time when running the code, AngularJS will again look for $scope.product.name and $scope.product.price but will find different values to display. |
Your byte size news and commentary from Silicon Valley the land of startup vanities, coding, learn-to-code and unicorn billionaire stories.
Ad
Thursday, January 28, 2016
Codecademy Tutorials AngularJS Your First App Part 3 Workflow
Subscribe to:
Post Comments (Atom)
React UI, UI UX, Reactstrap React Bootstrap
React UI MATERIAL Install yarn add @material-ui/icons Reactstrap FORMS. Controlled Forms. Uncontrolled Forms. Columns, grid
-
This review is updated continuously throughout the program. Yay I just joined the Udacity Nanodegree for Digital Marketing! I am such an Uda...
-
All you need to know about Snap IPO. Tech startup news explained for Youtubers in minutes.
-
Codecademy AngularJS tutorial solution Part 3 Workflow .1 Adding a new product to $scope $scope helps the controller passes data to t...
ReplyDeleteThanks for sharing about Angular,It’s a structural framework for dynamic web application; it lets you extend the syntax of HTML to demonstrate your apps components clearly. All functionality happens inside the browser making it an ultimate companion with any server technology.
Regards,
Angularjs training in chennai
Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
ReplyDeleteNode JS training in chennai | Node JS training institute in chennai
Thanks a lot for sharing this amazing knowledge with us. This site is fantastic. I always find great knowledge from it.
ReplyDeleteHire Angular JS Developer
Angularjs Training
ReplyDeleteAngular.js Course
Angularjs Online Training
Angularjs Training in Chennai
ReplyDeleteThis blog shares more useful information. Thank you sharing this blog...
PHP Training in Chennai
PHP Training in bangalore
php training in coimbatore
php Course in madurai
aws training in bangalore
Data Science Courses in Bangalore
PHP Course in Chennai
php course in bangalore
php training in coimbatore
php training in madurai
ReplyDeleteThanks for posting this.I got lots of information from your blog.
Software Testing Training in Chennai
Software Testing Training in Bangalore
Software Testing Training in Coimbatore
Software Testing Training in Madurai
Software Testing Training Institute in Chennai
Software Testing Course in Chennai
Testing Course in Chennai
Software Testing Training Institute in Bangalore
Selenium Course in Bangalore
Excellent blog!!! I got to know the more useful information by reading your blog. Thanks for posting this blog.
ReplyDeleteastrologers in india
astrology online
best astrologer in andhra pradesh
best astrology online
astrology
famous astrologer in andhra pradesh
best astrologer near me
top 10 astrologers in andhra pradesh
ReplyDeleteAmazing post.Thanks for sharing.........
Cyber Security Course in Pune
Cyber Security Course in Gurgaon
Cyber Security Course in Hyderabad
Cyber Security Course in Bangalore