Mastering Web Application Development with AngularJS 读书笔记(一)
第一章笔记 (一)
一、PS:运行时配置IIS
<html>
<head>
<script src="angular.js"></script>
</head>
<body ng-app ng-init="name = 'World'">
<h1>Hello, {{name}}!</h1>
</body>
</html>
<body ng-app ng-init="name='World'">
Say hello to:<input type="text" ng-model="name" />
<h1>hello,{{name}}</h1>
</body>
<script type="text/javascript" src="angular.js"></script>
<script type="text/javascript">
var HelloCtrl = function ($scope) {
$scope.name = 'World';
$scope.getName = function() {
return $scope.name;
};
}
</script>
<body ng-app >
<div ng-controller="HelloCtrl">
Say hello to: <input type="text" ng-model="name"><br>
<h1>Hello, {{name}}!</h1>
<h2>The same,{{getName()}}</h2>
</div>
</body>
<script type="text/javascript">
var WorldCtrl = function ($scope) {
$scope.population = 7000;
$scope.countries = [
{name:'France', population:63.1},
{name:'United Kingdom', population:61.8}
];
}
</script>
<body ng-app >
<div ng-controller="WorldCtrl" class="container">
<ul>
<li ng-repeat="country in countries">
{{country.name}} has population of{{country.population}}millions
</li>
</ul>
</div>
</body>
$scope.worldsPercentage = function (countryPopulation) {
return (countryPopulation / $scope.population)*100;
}
<li ng-repeat="country in countries">
{{country.name}} has population of{{country.population}}millions,
{{worldsPercentage(country.population)}} % of the World's population
</li>
var HelloCtrl = function ($scope) {
};
<body ng-app ng-init="name='World'">
<h1>Hello, {{name}}</h1>
<div ng-controller="HelloCtrl">
Say hello to: <input type="text" ng-model="name">
<h2>Hello, {{name}}!</h2>
</div>
</body>
<body ng-app ng-init="thing={name:'World'}">
<h1>Hello, {{thing.name}}</h1>
<div ng-controller="HelloCtrl">
Say hello to: <input type="text" ng-model="thing.name">
<h2>Hello, {{thing.name}}!</h2>
</div>
</body>
Mastering Web Application Development with AngularJS 读书笔记(一)的更多相关文章
- Mastering Web Application Development with AngularJS 读书笔记-前记
学习AngularJS的笔记,这个是英文版的,有些地方翻译的很随意,做的笔记不是很详细,用来自勉.觉得写下来要比看能理解的更深入点.有理解不对的地方还请前辈们纠正! 一.关于<Mastering ...
- Mastering Web Application Development with AngularJS 读书笔记(三)
第一章笔记 (三) 一.Factories factory 方法是创建对象的另一种方式,与service相比更灵活,因为可以注册可任何任意对象创造功能.例如: myMod.factory('notif ...
- Mastering Web Application Development with AngularJS 读书笔记(二)
第一章笔记 (二) 一.scopes的层级和事件系统(the eventing system) 在层级中管理的scopes可以被用做事件总线.AngularJS 允许我们去传播已经命名的事件用一种有效 ...
- WEB Application Development Integrator : 应用设置
1.1. 系统安装 应用 Oracle EBS WEB Application Development Integrator WEB ADI在Oracle EBS 11.5.10.* 版本 ...
- 精通AngularJS 读书笔记(2)
AngularJS 速成 视图 因为AngularJS 依靠浏览器去解析模板,所以要保证模板是有效的HTML.尤其要小心闭合号HTML标签(未闭合好的标签不会产生任何错误信息,但会让视图不能正确渲染) ...
- 精通AngularJS 读书笔记(1)
邂逅AngularJS AngularJS是采用JavaScript语言编写的客户端MVC框架,帮助开发者编写现代化的单页面应用.尤其适合编写有大量CURD操作的,具有AJAX风格的富客户端应用. 使 ...
- ASP.NET WEB API 2 框架揭秘 读书笔记(一)
第一章 概述 主要内容是介绍Web的基本概念,Restfull的基本概念及特性.最后介绍创建简单WebApi程序的步骤. Web的基本概念 IP/TCP协议簇分层,分为两种 链路层->网络层-& ...
- 《Java web 开发实战经典》读书笔记
去年年末,也就是大四上学期快要结束的时候,当时保研的事情确定了下来,终于有了一些空闲的时间可以学点实用的技术. 之前做数据库课程设计的时候,也接触过java web的知识,当时做了一个卖二手书籍的网站 ...
- Java web轻量级开发面试教程读书笔记:数据库方面,如何准备面试
如果在面试或与资深人事交流的过程中,你能有效合理地展示出本章所给出的一些知识点,那么对你的评价就会是"对数据库有深入了解",甚至能加上"有设计数据表的经验",即 ...
随机推荐
- Jenkins 2.x新建节点配置(Windows)
2.0版本以上默认加入了权限插件,所以在进入主界面时是需要登录的. 一.主界面->[系统管理]->[管理节点]->[新建节点],进行节点的添加: 二.输入节点名称,已经选择[Perm ...
- Linux部分命令使用记录(实时更新)
1. 实时监控文件内容变化 tail -f xxx 2. 查看文件前5行 head -5 xxx 3. ssh对话失效后关闭对话(可以避免直接关闭终端) ~. (好像显示有问题,按钮是 -.) 4. ...
- java函数substring()
String str; str=str.substring(int beginIndex);截取掉str从首字母起长度为beginIndex的字符串,将剩余字符串赋值给str: str=str.sub ...
- spring--学习之IOC DI
2.1.1 IoC是什么 Ioc-Inversion of Control,即"控制反转",不是什么技术,而是一种设计思想.在Java开发中,Ioc意味着将你设计好的对象交给容器 ...
- python 动态调用模块、类、方法(django项目)
需求:近一段时间基于django框架,开发各业务层监控代码,每个业务的监控逻辑不同,因此需要开发监控子模块,动态的导入调用. 项目名称:demo_django App:common_base.moni ...
- java泛型中<?>和<T>有什么区别?
public static void printColl(ArrayList<?> al){ Iterator<?> it = al.iter ...
- 【原】gulp快速入门
今天刚入职了一家新公司,结果明天就要开始项目了.上级说要用gulp来打包代码,所以今晚花了一晚来看这个gulp, 可以说已经入门了.所以做一个小小的总结 : 首先全局安装gulp npm instal ...
- 9月8日HTML表单元素(form、文本、按钮、选择)
表单元素 一.form form代表表单,功能:用于申明表单,定义采集数据的范围,也就是<form>和</form>里面包含的数据将被提交到服务器或者电子邮件里.<for ...
- NAT穿透解决方案介绍
最近公司要实现在各种网络环境下面的多屏互动(机顶盒.android phone.iphone及PC端)的需求:由于IP地址资源有限的原因,目前我们使用的各种终端设备都位于局域网后面也就是多台设备共享同 ...
- centos6.5分区简易操作
fdisk /dev/sdb --->n--->p---->输入分区大小(回车就默认全部大小) mkfs.ext4 /dev/sdb1 mkdir /data 在根目录下新建data ...