Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

AngularJS是什么,为什么使用AngularJS,AngularJS有哪些特点,什么是模板技术,Controller、常用依赖项、数据交互是什么,如何实现动画技术。

★ 重要的概念

1.angular和JavaScript不互通 2.Angular的开发模式和传统开发模式完全不同--只需要盯住数据

数据是核心

解释
1. 函数不互通,变量不互通,事件也不互通 2. 注意力放在数据,angular接管了UI

1.认识AngularJS MVx概念
数据和表现分离
Angular是什么
扩展HTML功能;颠覆性,可扩展
为什么使用angular
减轻程序员负担,避免重复劳动

2.AngularJS基本使用

MVC:

简称 英文 对于关系
M Modle 模型— 数据
V View 视图—表现层
C Controller 控制器— 业务逻辑
  • ng-model 数据,双向绑定
  • ng-bind (受限,不灵活)输出
  • ng-app 范围
  • 双向绑定
  • 依赖注入 函数 -- 参数由调用方决定
    依赖注入 -- 参数由定义方决定

3.模板技术

  • {{输出}}
  • ng-init 初始化
  • ng-click 事件
  • ng-repeat
  • 数组、json

4.Controller 什么是Controller Controller用法 依赖注入的两种方式 过滤器-filter 链接、图片

5.常用依赖项 $scope $http $location

6.ajax数据交互

7.动画技术

架构思想
不要想新技术的使用,而是要想新技术的思想到底是什么。
Morty Proxy This is a proxified and sanitized view of the page, visit original site.