Learning Angular.js from scratch - Live Coding

Published on Tuesday, July 30, 2013

Description

This was my very first coding experience with Angular.js. What I wanted to accomplish in this first session was more or less the following: 1. Write something that uses Angular.js functionality 2. Get acquainted with some of the most basic and fundamental concepts of this JavaScript library 3. Have fun What I learned from this exercise was: 1. Angular uses JavaScript constructor functions to create objects that drive HTML templates. These objects (called ngControllers) can have properties that can be rendered into the template (aka. ngView - if that's what they'd call the template). 2. The variable placeholder used in the view can contain some simple expressions (such as or other simple math operations and so forth. Not any arbitrary operation is accepted inside those curlies. 3. You can use some inherited properties from your ngController (model data), such as .length 4. You can use native JavaScript expressions/constructs inside Angular's template placeholders 5. When you use a controller property inside an HTML attribute, don't include the curly braces, as you would when printing that value as part of the view. What I'd like to learn next: 1. How to functions inside the controller 2. How to load data into controller (and from there into the view) using Ajax (XHR) 3. How to register event listeners 4. How to access data through event listeners (example: how would I get the id attribute of a button after it gets clicked) Copyright (c) 2013 Rodrigo Silveira http://www.easylearntutorial.com

Copyright © 2014-2017 EasyLearnTutorial. All rights reserved.