introduction:this article is going to introduce AngularJS in generally. I will write it through five points.Number one is what is AngularJS.Number two is why use Angular.Number three
is how angularJS works.Number four is about modules.Number five is my own summery.

Number one_what is it

Front -end javascript framework for creating web applications;

Open source maintained by Google;

MVC pattern

Handles common(and ofter trying tasks) such as DOM manipulation,updating UI based on data or input, registering callbacks;

Decarative programming

Number two_why use it

Good for dynamic web sites/web apps(VRUD based);

Framework imposes a structure that is good for organizetion;

Helps create responsive(fast) websites;

Easy to test-to create software that is easily maintained;

Number three_how it works

AngularJS will initialize when the DOM content is loaded;

Looks for the ng-app directive-if its found,that is the root of the app;

Directives can be declared a variety of ways:typically with the ng-prefix,but you can use data-ng;

It will load the module associated with the directive if specified;

PS: what is the difference between ng-prefix and data-ng? ok, when your brower's version is old, maybe you should use data-ng!

Number four_modules

what are modules?

It's containers for the various parts of your application(controllers,services etc). It's declarative-easy to understand. It's maintainable,readable,testable. It defines dependencies for our app.

Modules setup: A module is comprised of configuration and run blocks. Configuration blocks-executed during configuration and registration. Only peoviders and constants can be passed. Run blocks-happen
after the injector is created. Only instances and constants can be passed in and is like a main method-it kickstarts the application.

PS:Modules can depend on other modules and they are only loaded once.

Number five_summery

first of all, let me show some code:

<span style="font-family:KaiTi_GB2312;font-size:18px;"><!doctype html>
<html ng-app>
<head>
<script src="http://code.angularjs.org/angular-1.0.1.min.js"></script>
</head>
<body>
My name:<input type="text" ng-model="MyName" placeholder="please write down your name !">
<hr>
Hello, My name is {{MyName||''}}
</body>
</html></span>

please run the code in your brower, then there is surprise for you.

I gonna publish my blog in english, Maybe it's not good at the beginning, but it's okay . the next blog is about Angular Controllers!

[AngularJS 1] Introduction to AngularJS的更多相关文章

  1. AngularJS学习笔记二:AngularJS指令

    AngularJS 指令: AngularJS 通过被称为 指令 的新属性来扩展 HTML. AngularJS 指令是扩展的 HTML 属性,带有前缀 ng-. 几个常用 指令: ng-app 指令 ...

  2. AngularJS学习笔记2——AngularJS的初始化

    本文主要介绍AngularJS的自动初始化以及在必要的适合如何手动初始化. Angular <script> Tag 下面通过一小段代码来介绍推荐的自动初始化过程: <!doctyp ...

  3. [angularjs] MVC + Web API + AngularJs 搭建简单的 CURD 框架

    MVC + Web API + AngularJs 搭建简单的 CURD 框架 GitHub 地址:https://github.com/liqingwen2015/Wen.MvcSinglePage ...

  4. AngularJS学习之旅—AngularJS 模块(十五)

    一.AngularJS 模块 模块定义了一个应用程序. 模块是应用程序中不同部分的容器. 模块是应用控制器的容器. 控制器通常属于一个模块. 1.创建模块 通过 AngularJS 的 angular ...

  5. AngularJS学习之旅—AngularJS 控制器(六)

    1.AngularJS 控制器 AngularJS 应用程序被控制器控制. ng-controller 指令定义了应用程序控制器. 控制器是 JavaScript 对象,由标准的 JavaScript ...

  6. AngularJS学习之旅—AngularJS 指令(三)

    1.AngularJS 指令 AngularJS 通过被称为 指令 的新属性来扩展 HTML. AngularJS 通过内置的指令来为应用添加功能. AngularJS 允许你自定义指令.2.Angu ...

  7. AngularJS学习之旅—AngularJS 表达式(二)

    1.AngularJS 表达式 AngularJS 表达式写在双大括号内:{{ expression }}. AngularJS 表达式把数据绑定到 HTML,这与 ng-bind 指令有异曲同工之妙 ...

  8. 【AngularJS学习笔记】AngularJS表单验证

    AngularJS表单验证 AngularJS提供了一些自带的验证属性 1.novalidate:添加到HTML的表单属性中,用于禁用浏览器默认的验证. 2.$dirty   表单有填写记录 3.$v ...

  9. AngularJS学习笔记(1) - AngularJS入门

    什么是AngularJS? AngularJS是建立在jQuery的一个轻量级版本之上的MVC框架.MVC将业务逻辑代码和视图.模型相分离.AngularJS提供的所有功能都可以通过使用JavaScr ...

随机推荐

  1. 一. JVM发展史,运行时数据区域,四大引用

    一.JVM的出现 JVM将字节码解释成不同os下的机器指令,有了jvm,java语言在不同平台上运行时不需要重新编译 虚拟机发展史 (1)Sun Classic classic jvm要么采用纯解释器 ...

  2. Form_Form标准控件Folder开发解析(案列)

    2014-01-09 Created By BaoXinjian 1. 打开APPSTAND.fmb, 并加载程序库APPFLDR.pll. 2. 基于APPSTAND.fmb生成Folder开发所需 ...

  3. Educational Codeforces Round 15 Cellular Network

    Cellular Network 题意: 给n个城市,m个加油站,要让m个加油站都覆盖n个城市,求最小的加油范围r是多少. 题解: 枚举每个城市,二分查找最近的加油站,每次更新答案即可,注意二分的时候 ...

  4. redis使用日志(二) 数据存储到redis

    一段简短的代码,来展示如何把爬取内容写到redis里面: #! /usr/bin/env python # -*- coding=utf-8 -*- import requests import js ...

  5. C++模板元编程 - 3 逻辑结构,递归,一点列表的零碎,一点SFINAE

    本来想把scanr,foldr什么的都写了的,一想太麻烦了,就算了,模板元编程差不多也该结束了,离开学还有10天,之前几天部门还要纳新什么的,写不了几天代码了,所以赶紧把这个结束掉,明天继续抄轮子叔的 ...

  6. MySQL 开启与关闭远程访问&&授权前需执行GRANT USAGE ON *.* TO 'cai'@'%' IDENTIFIED BY 'caigan2015';才能终端访问

    MySQL 开启与关闭远程访问 (1)通过MySQL用户去限制访问 权限系统目的: MySQL基于安全考虑root账户一般只能本地访问,但是在开发过程中可能需要打开root的远程访问权限,今天介绍的就 ...

  7. 30天轻松学习javaweb_http头信息实例

    package com.wzh.test.http; import java.io.ByteArrayOutputStream;import java.io.IOException;import ja ...

  8. 论职务犯罪案件侦查 z

    1996年3月17日八届人大四次会议修订的<刑事诉讼法>第96条    第一款中有规定:犯罪嫌疑人在被侦查机关第—次讯问后或者采取强制措施之日起,可以聘请律师为其提供法律咨询.代理申诉.控 ...

  9. 根据职位名,自动生成jd

    代码本身就是最好的解释,不赘述. 文本聚类输出: cluster.py #!/usr/bin/env python # coding=utf-8 import jieba,re from gensim ...

  10. SqlCommand.ExecuteNonQuery()执行查询返回值的问题

    SqlCommand.ExecuteNonQuery 方法对连接执行 Transact-SQL 语句并返回受影响的行数.但是有个前提:必须是 UPDATE.INSERT 和 DELETE 语句.而对于 ...