angular笔记_1
第一个angular文件
<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
<div ng-app="hd" ng-controller="ctrl">
<h2>{{name}}</h2>
<h1 ng-bind="name"></h1>
<input type="text" ng-model="name"/>
<!--input值改变的时候 h1,h2的值也会随之变化-->
</div>
<script>
var m=angular.module('hd',[]);//声明模块
//声明控制器->ctrl
//注入师徒模型->$scope
m.controller('ctrl',['$scope',function($scope){
$scope.name="百度"; //双向数据绑定
}]);
</script>
angular笔记_1的更多相关文章
- angular笔记
/** * Created by Administrator on 2016/5/3 0003. */ ng-app是告诉angularjs编译器把该元素当作编译的根 //定义模块 var myApp ...
- Angular笔记-select
--select-- 设置默认选中值方法: <select ng-model="url" ng-options="x.url as x.site for x in ...
- angular笔记_7
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- angular笔记_6
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- angular笔记_5(全选/反选)
全选和反选 BUG:当鼠标点击其中一个选项后,在点击全选按钮,该选项失效 <!DOCTYPE html><html lang="en"><head&g ...
- angular笔记_4(函数)
angular.isString();是否字符串 angular.isNumber();是否数字 angular.isArray();是否数组 angular.isDate();是否日期/时间 ang ...
- angular笔记_3
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- angular笔记_2
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- Angular 笔记系列(二)数据绑定
数据绑定这块儿没啥说的,简单两个例子带过了. Hello World: <!DOCTYPE html> <html ng-app> <head> <title ...
随机推荐
- select下拉框可以直接取list里的内容 不用非得转map (不得不承认我是个ZZ,这么简单的问题才反应过来,--^--)
需求描述:select下拉框的填充项,从后台传来的list中获取 自黑一下:之前有篇随笔,写的是通过map传到前台,在前台的select中的value属性取值 用map的key,而select的tex ...
- mybatis的插件分析
mybatis插件回在解析配置是通过pluginAll方法将插件添加到插件链中,然后会在sqlSessionfactory.openSession()方法中将插件链绑到executor上,在执行sql ...
- Python+selenium自动化测试中Windows窗口跳转方法
Python+selenium自动化测试中Windows窗口跳转方法 #第一种方法 #获得当前窗口 nowhandle=driver.current_window_handle #打开弹窗 drive ...
- oracle数据库无法连接 The Network Adapter could not establish
Caused by: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection 这个错误 ...
- 论文阅读笔记二十八:You Only Look Once: Unified,Real-Time Object Detection(YOLO v1 CVPR2015)
论文源址:https://arxiv.org/abs/1506.02640 tensorflow代码:https://github.com/nilboy/tensorflow-yolo 摘要 该文提出 ...
- matlab转c++代码实现(主要包含C++ std::vector,std::pair学习,包含数组与常数相乘,数组相加减,将数组拉成一维向量,图片的读入等内容)
MATLAB部分: xmap = repmat( linspace( -regionW/2, regionW/2, regionW), regionH, 1 );%linspace [x1,x2,N] ...
- python functools
# 工具函数import functools print(dir(functools)) # partial函数(偏函数)def showarg(*args,**kw): print(args) pr ...
- MyBatis - 1.入门
MyBatis 是支持定制化 SQL.存储过程以及高级映射的优秀的持久层框架. MyBatis 避免了几乎所有的 JDBC 代码和手动设置参数以及获取结果集. MyBatis可以使用简单的XML或注解 ...
- Hyper-V 替换 vmwp
要激活 Hyper-V 下的虚机 最简单的方法是用带证书的vmwp替换掉原来的 带证书的vmwp参见:http://bbs.pcbeta.com/viewthread-1408240-1-1.html ...
- nginx proxy_pass指令’/’注意事项
1. proxy_pass配置说明 不带/ location /test/ { proxy_pass http://t6:8300; } 带/ location /test/ { proxy_pass ...