Skip to main content

learn angularjs at codeacademy

I learn angularjs and build some code from scratch. The first, it show up the skeleton of website structure.


wwwroot:
-CSS
++main.css                -->css how your website style
-IMG                         -->image for your website
++someIMG
-JS
++CONTROLLERs
++++maincontroller.js --->main controller
++SHARED                -->include angularjs support library
++++angular-mocks.js
++++angular-route.min.js
++++angular.min.js
++app.js            -->call into action
-INDEX.HTML--->the start point


Start point include 6 steps from introduction:
Awesome! You built an AngularJS app. How does it work?
  1. In app.js, we created a new module named myApp. A module contains the different components of an AngularJS app.
  2. Then, in index.html we added <body ng-app="myApp">. The ng-app is called a directive. It tells AngularJS that the myApp module will live within the <body> element, termed the application's scope. In other words, we used the ng-app directive to define the application scope.
  3. In MainController.js we created a new controller namedMainController. A controller manages the app's data. Here we use the property title to store a string, and attach it to $scope.
  4. Then, in index.html, we added<div class="main" ng-controller="MainController">. Likeng-appng-controller is a directive that defines the controller scope. This means that properties attached to $scope in MainControllerbecome available to use within <div class="main">.
  5. Inside <div class="main"> we accessed $scope.title using{{ title }}. This is called an expression. Expressions are used to display values on the page.
  6. The value of title showed up when we viewed the app in the browser.
  7. The same framework we can see there: the View-the Controller

Comments

Popular posts from this blog

Creator Academy’s Foundations for success boot camp!

Creator Academy’s Foundations for success boot camp! Thanks for signing up for the Creator Academy’s Foundations for success boot camp! We’re super excited to help you learn the fundamentals for creating your ultimate channel and keep it thriving on YouTube. Boot camp begins  April 20, 2016 , and we’ll follow up on that day with some details to get you ready. Until then, get out there and create your next video! Waiting for the first tutorial about this article. I register this course from youtube academy, success, say easily but do hard. Who define what is success? I found this on the web:" Jim Rohn’s 10 Foundations for Success Revealed SUCCESS will share classic footage of Jim Rohn and new lessons from personal development icons during this free Rohn broadcast event. SUCCESS Staff   September 21, 2015 For the past year, SUCCESS staff has gone into the vaults of the massive Jim Rohn library and watched thousands of hours of decades-ol...

New youtube rule, 4000 watch hours and 1000 subscribers, I quit

New youtube rule, 4000 watching hours and 1000 subscribers, I quit How many channel get the new email from youtube about Youtube Partner Program( YPP)? I get one about new rule 4000 hours of watching and 1000 subscribers. " What's Changing Under the new eligibility requirements announced today, your YouTube channel, Explorer Mr, is no longer eligible for monetization because it doesn’t meet the new threshold of 4,000 hours of watchtime within the past 12 months and 1,000 subscribers. As a result, your channel will lose access to all monetization tools and features associated with the YouTube Partner Program on  February 20, 2018  unless you surpass this threshold in the next 30 days. Accordingly, this email serves as 30 days notice that your YouTube Partner Program terms are terminated. One of YouTube’s core values is to provide anyone the opportunity to earn money from a thriving channel. Creators who haven’t yet reached this new threshold can continue to benefit fro...

league of legend, boring patch 6.9

league of legend, boring patch 6.9 I was down my rank 2 form silver 3 to silver 5 after losing 10 matches continuous. That game increasingly bored, I don't know why the match find the team like that. It's unreasonable. I can't 1 vs 5 with the enemy team. The gamer, did not even know how to play, go to play the ranked game. I try to play top, mid, bot, support but it's not effective. I up my rank from bronze IV to silver 3, almost silver 2 during 2 month but down 2 ranks in about 1 week. I wonder why this system go like that. If you have skill, you will be the key to win this battle but you can't versus all the enemy. Your friends feed too much. they don't know how to combat. They always attack the first foe that is a hard tank, and so, the opponent ' ADC AP kill us all. It's terrible if you want to win but you can't. I confuse in this situation. How can I play to control the combat and win. Their attitude is bad in this game. They play and sh...