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

youtube strike mistake

An error of youtube system? My channel had a strange strike notice from youtube. I have just streamed my lol game. An error occurred, I stopped and restarted this live stream. Then I deleted the error video. I received a strike notice mail from google. They lead me to the basic guild line as the link: https://support.google.com/youtube/answer/185111?hl=en But I don't see the link to appeal form I clicked the link from email, it navigated to my videos dashboard. This disadvantage make me confuse about google system. It can be an error or a new policy that not public yet. I can't wait for a long time about 3 month to make my live stream work. One thing that I remember when I click to the link in the mail box, it show me to the form with acknowledge button, I can't do anything but click to the terrible button. It have two way to appeal this strike: 1. from the channel setting ( but it failed as I said above), 2.from the link of no-reply google mail( it show

Youtube boot camp Pre-production- Course Quiz-The key to pass

Youtube boot camp Pre-production- Course Quiz-Key I completed my quiz about 82% and take pass after fight with 11 question of the youtube academy quiz. As I promise in the previous post , I updated my answer to pass this quiz. Question 1 of 11( 1 ) What are successful creators' top considerations before they even begin to write a script? Budget, target audience, production style, and how much they love the concept. Budget, YouTube Analytics, your passion for the topic, and the equipment you plan to use. The equipment they plan to use, their budget, software for scriptwriting, and ability to draw. Budget, target audience, the reliability of their computer, and artistic ability. Question 2 of 11( 2 ) Mariah is a new creator on YouTube. She has many ideas for videos but when it comes time to actually discuss them, she can’t remember her former moments of brilliance. What can you suggest to Mariah? She should record a short video the moment she has the idea.

YouTube Creator Academy-Jumpstart your channel in the course: Foundations for success boot camp-day1

YouTube Creator Academy- Jumpstart your channel in the course: Foundations for success boot camp-day1 Welcome to YouTube and our home for creator education -- the Creator Academy! Our lessons and courses are built to help you excel on YouTube. We’ll guide you through the essentials you need to know when starting a channel. BEST PRACTICE -So you wanna be a Youtuber: 4 steps guide  Create a channel:  When setting up a channel on YouTube, you may want to get the initial housekeeping tasks out of the way (like naming, setting privacy permissions, etc.) so you can focus on taking your great channel idea and transforming it into a reality. We’ll show you the steps to kickstart your channel and get it ready for future uploads. Be found:  Next, consider how your videos will get discovered on YouTube. Successful creators often grow their channel by finding the right audience and adding customizations. For example, adding thumbnails, metadata, and a clickable title can help viewer