AngularJS Tutorial - lesson 1

AngularJS Tutorial - lesson 1

Basic

What is AngularJS

AngularJS is a Javascript MVC framework created by Google to build properly architecture and maintenable web applications.

AngularJS is MVC framework that defines numerous concepts to properly organize our web application. Our application is defined with modules that can depend from one to the others. It enhances HTML by attachcing directives to our pages with new attributes ot tags and expressions in order to define very powerful templates directly in our HTML. It also encapsulates the behavior of our application in controllers which are instanciated to dependency injection. AngularJS helps us to structure and test our Javascript code very easily. Finally, utility code could easily be factorized into services that can be injected in our controllers. Now let's have a closer look at these features.

Hello World!

We can download the lastest AngularJS [here][1], Or using following HTML script to ref this lib

`

`
Let's begin with classic "Hello World!"

`
<!doctype html>

Hello {{'World'}}! `

Expressions

AngularJS contains several concepts to separate the different parts of you application.
In order to create the views of our application, AngularJS could execute [expressions][] directly within your HTML pages. In those expressions, We have access to Javascript code which give us the ability to realize some computation in order to display what we want. In the following example, we can see a very basic expression and result.

Example:
`

1+1 = {{1+1}}
` **The actual effect of display** 1 + 1 =2

[1]:

Written with MarkdownEditor.

posted @ 2014-05-15 21:36  ~鼎鼎~  阅读(156)  评论(0编辑  收藏  举报