day66—angularJS学习笔记-表达式
转行学开发,代码100天——2018-05-21
angular的变量数据初始化:
ng-init="quantity=1;cost=30;student={firstName:'李',lastName:'刚',rollno:101};marks=[82,91,78,77,64]"
数据调用:{{参数}}
<!DOCTYPE html>
<html>
<head>
<title>angularJS 表达式</title>
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript">
angular.module("myApp",[]).controller('control1',function($scope) {
});
</script>
</head>
<body ng-app="myApp" ng-init="quantity=1;cost=30;student={firstName:'李',lastName:'刚',rollno:101};marks=[82,91,78,77,64]">
<p>Hello :{{student.firstName+' '+student.lastName}}</p>
<p>Expense on books:{{cost*quantity}} RS</p>
<p>Roll No:{{student.rollno}}</p>
<p>Marks(math):{{marks[3]}}</p>
</body>
</html>

day66—angularJS学习笔记-表达式的更多相关文章
- AngularJs学习笔记--expression
原版地址:http://code.angularjs.org/1.0.2/docs/guide/expression 表达式(Expressions)是类Javascript的代码片段,通常放置在绑定 ...
- AngularJs学习笔记--directive
原版地址:http://code.angularjs.org/1.0.2/docs/guide/directive Directive是教HTML玩一些新把戏的途径.在DOM编译期间,directiv ...
- AngularJs学习笔记--concepts(概念)
原版地址:http://code.angularjs.org/1.0.2/docs/guide/concepts 继续.. 一.总括 本文主要是angular组件(components)的概览,并说明 ...
- AngularJs学习笔记--Scope
原版地址:http://code.angularjs.org/1.0.2/docs/guide/scope 一.什么是Scope? scope(http://code.angularjs.org/1. ...
- AngularJs学习笔记--Understanding the Model Component
原版地址:http://docs.angularjs.org/guide/dev_guide.mvc.understanding_model 在angular文档讨论的上下文中,术语“model”可以 ...
- AngularJs学习笔记--E2E Testing
原版地址:http://docs.angularjs.org/guide/dev_guide.e2e-testing 当一个应用的复杂度.大小在增加时,使得依靠人工去测试新特性的可靠性.抓Bug和回归 ...
- AngularJs学习笔记--Understanding Angular Templates
原版地址:http://docs.angularjs.org/guide/dev_guide.mvc.understanding_model angular template是一个声明规范,与mode ...
- AngularJs学习笔记--Forms
原版地址:http://code.angularjs.org/1.0.2/docs/guide/forms 控件(input.select.textarea)是用户输入数据的一种方式.Form(表单) ...
- AngularJs学习笔记--Guide教程系列文章索引
在很久很久以前,一位前辈向我推荐AngularJs.但当时我没有好好学习,仅仅是讲文档浏览了一次.后来觉醒了……于是下定决心好好理解这系列的文档,并意译出来(英文水平不足……不能说是翻译,有些实在是看 ...
随机推荐
- java 统计字符串中连续重复的字符,并得出新字符串
题目: 比如输入为aaabbc,输出a3b2c1 完整解答: public class Other { static String func(String str) { StringBuffer re ...
- keymaps - 对键盘映射文件的描述
描述 (DESCRIPTION) loadkeys(1) 能够 通过 调入 指定的 文件 修改 键盘翻译表, 键盘翻译表 通常 用于 内核的 键盘驱动程序; 另外 dumpkeys(1) 可以 根据 ...
- 修改docker自定义网桥后的默认网卡名称
[root@docker2 ~]# docker network create --subnet=10.10.10.0/24 docker1 #新键网桥docker142323044a4 ...
- Jsoup抓取网页数据完成一个简易的Android新闻APP
前言:作为一个篮球迷,每天必刷NBA新闻.用了那么多新闻APP,就想自己能不能也做个简易的新闻APP.于是便使用Jsoup抓取了虎扑NBA新闻的数据,完成了一个简易的新闻APP.虽然没什么技术含量,但 ...
- UEditor富文本编辑器简单使用
UEditor富文本编辑器简单使用 一.下载地址:https://ueditor.baidu.com/website/ 官网中并没有 python 版本的 UEditor 富文本编辑器,本文简单介绍 ...
- setTimeout延迟加载
使用setTimeout延时计算 setTimeout当时间为0时
- sqlserver表值函数调用方式
Connection conn = sqlServerManage.sqlServerConn(); Statement stmt; ResultSet rs; // 组装sql StringBuff ...
- IP地址(参考百度百科)
题目1:用子网掩码划分网络时,如果划分8个子网,则需要4位.因为24-2>=8.(全0代表网络自身,全1代表广播地址,所以减2) 以C类地址为例,(1)8个子网,则4位子网,主机号为后4位,主机 ...
- mongodb切片配置方法
---------------------------------切片架构图-------------------------------------------------------------- ...
- 【leetcode】Basic Calculator III
题目如下: Implement a basic calculator to evaluate a simple expression string. The expression string may ...