转行学开发,代码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学习笔记-表达式的更多相关文章

  1. AngularJs学习笔记--expression

    原版地址:http://code.angularjs.org/1.0.2/docs/guide/expression 表达式(Expressions)是类Javascript的代码片段,通常放置在绑定 ...

  2. AngularJs学习笔记--directive

    原版地址:http://code.angularjs.org/1.0.2/docs/guide/directive Directive是教HTML玩一些新把戏的途径.在DOM编译期间,directiv ...

  3. AngularJs学习笔记--concepts(概念)

    原版地址:http://code.angularjs.org/1.0.2/docs/guide/concepts 继续.. 一.总括 本文主要是angular组件(components)的概览,并说明 ...

  4. AngularJs学习笔记--Scope

    原版地址:http://code.angularjs.org/1.0.2/docs/guide/scope 一.什么是Scope? scope(http://code.angularjs.org/1. ...

  5. AngularJs学习笔记--Understanding the Model Component

    原版地址:http://docs.angularjs.org/guide/dev_guide.mvc.understanding_model 在angular文档讨论的上下文中,术语“model”可以 ...

  6. AngularJs学习笔记--E2E Testing

    原版地址:http://docs.angularjs.org/guide/dev_guide.e2e-testing 当一个应用的复杂度.大小在增加时,使得依靠人工去测试新特性的可靠性.抓Bug和回归 ...

  7. AngularJs学习笔记--Understanding Angular Templates

    原版地址:http://docs.angularjs.org/guide/dev_guide.mvc.understanding_model angular template是一个声明规范,与mode ...

  8. AngularJs学习笔记--Forms

    原版地址:http://code.angularjs.org/1.0.2/docs/guide/forms 控件(input.select.textarea)是用户输入数据的一种方式.Form(表单) ...

  9. AngularJs学习笔记--Guide教程系列文章索引

    在很久很久以前,一位前辈向我推荐AngularJs.但当时我没有好好学习,仅仅是讲文档浏览了一次.后来觉醒了……于是下定决心好好理解这系列的文档,并意译出来(英文水平不足……不能说是翻译,有些实在是看 ...

随机推荐

  1. Linux操作系统笔记

    #include <stdio.h> #include <stdlib.h> #include <unistd.h> //linux下面的头文件 #include ...

  2. (转) windows 下ORA-12514:TNS 监听问题

    在使用Orcale数据库的时候不知道各位是否遇到过如图的监听问题(或者显示类似的问题),以下方法就是来解决这样的问题的.    首先右击计算机,选择管理.选择左侧栏的服务与应用程序,右侧栏选服务.   ...

  3. [工具] BurpSuite--XssValidator插件

    0x00 安装 所需软件: 1.burpsuite 2.xssvalidator 源码:https://github.com/nVisium/xssValidator(按照编译指导编译) burpsu ...

  4. [工具] BurpSuite--Scanner功能

    BurpSuite--Scanner功能 0x00 配置 Scanner有四个选项 Result -- 展示扫描结果 Scan queue -- 显示扫描的队列 Live scanning -- 我们 ...

  5. 【NOIP2016提高A组模拟10.15】最大化

    题目 分析 枚举两个纵坐标i.j,接着表示枚举区域的上下边界, 设对于每个横坐标区域的前缀和和为\(s_l\),枚举k, 显然当\(s_k>s_l\)时,以(i,k)为左上角,(j,k)为右下角 ...

  6. Mysql 连接路径 url 参数解析

    1.mysql - url 参数解析 url:jdbc:mysql://127.0.0.1:3306/user?useUnicode=true&characterEncoding=utf8 u ...

  7. Linux基础教程 linux下查询history操作时间的方法

    要在linux操作系统中查看history记录的操作时间,可以按如下步骤实现: 学习linux 1,修改/etc/profile文件,在末尾添加:exporthisttimeformat=”%f %t ...

  8. noip模拟题 Market

    题面描述: 数据范围: Solution: 我们发现\(v\)很小,但是\(M\)很大,考虑转化一下一般的背包 我们用\(f[v]\)来表示拿到价值为\(v\)的物品需要付出的最少代价,特别的,当\( ...

  9. logstash之OutPut插件

    output插件是经过了input,然后过滤结构化数据之后,接下来我们需要借助output传到我们想传到的地方.output相当于一个输出管道. 2.3.1: 将采集数据标准输出到控制台 配置示例: ...

  10. Python爬取中文页面的时候出现的乱码问题(续)

    我在上一篇博客中说明了在爬取数据的时候,把数据写入到文件的乱码问题 在这一篇里面我做一个总结: 1.首先应该看一个案例 我把数据写在.py文件中: #coding:utf-8 s = 'hehe测试中 ...