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...

YouTube Creator Academy-10 Fundamentals of a creative strategy in the course: Foundations for success boot camp-day2

YouTube Creator Academy-10 Fundamentals of a creative strategy in the course: Foundations for success boot camp-day2 Got a viral video that pulled 100,000 views? Great! But now what? Chances are, if the audience loved it, they’ll want more. Think beyond the one-video hit and consider developing a series of videos that are just as popular. Use these guidelines to test your ideas and give them the best chance of success on YouTube. BEST PRACTICES: -Shareability: Some ways to be shareable: Be topical:  When a story is breaking, join the conversation by crafting an episode around it. Be relatable:  Strike a chord with viewers on a subject they can relate to, whether it’s a broad topic like cell phone habits, or a niche topic like life in New York. Be valuable:  Try to provide practical value to the viewer. Tutorials rank among the most helpful, frequently used videos on YouTube. Be remarkable:  Upload a demonstration of exceptional talent or ability. -C...

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...