@{
Layout = null;
} <!DOCTYPE html> <html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Input</title>
<script type="text/javascript" src="~/Scripts/angular.js"></script>
</head>
<body>
<div ng-app="myApp">
<div ng-controller="firstController">
<input type="button" ng-value="text" ng-disabled="isDisabled" />
<input type="text" value="{{text}}" ng-readonly="isDisabled" />
<input type="checkbox" value="{{text}}" ng-checked="isDisabled" />
</div>
</div>
<script type="text/javascript">
var app = angular.module("myApp", []);
app.controller("firstController", function ($scope,$interval) {
// $scope.text = "phoneGap中文网";
$scope.isDisabled = true;
$scope.n = 5;
$scope.text = $scope.n + '秒';
var time=$interval(function () {
$scope.n--;
$scope.text = $scope.n + '秒';
if ($scope.n == 0)
{
$interval.cancel(time);
$scope.text = "可以点击了";
$scope.isDisabled = false;
}
},1000)
});
</script>
</body>
</html>

AngularJs练习Demo4的更多相关文章

  1. angularJS学习笔记二

    angularJS四个特性 1.MVC <!doctype html> <html ng-app> <head> <meta charset="ut ...

  2. AngularJS+ThinkPHP实例教程

    总体思路 thinkphp通过RESTful方式提供数据给angular,前端(包括模板页面)全部由angular来接管. 示例 实现一个用户管理模块,走通增删改查4个操作,通过该示例,演示如何在th ...

  3. angularjs中ng-show的使用

    ng-show 指令在表达式为 true 时显示指定的 HTML 元素,否则隐藏指定的 HTML 元素.下面是示例: <!doctype html> <html lang=" ...

  4. angularJS入门小Demo【简单测试js代码的方法】

    1.首先建立一个文件夹 demo, 2.在其中建立一个文本文档,改名为 demo-1.html, 3.把html中要引入的 js 文件拷贝到 demo目录下, 4.然后用 Notepadd++ 编辑刚 ...

  5. AngularJS - 入门小Demo

    AngularJS四大特效 MVC模式.模块化设计.自动化双向数据绑定.依赖注入 如果了解了后端开发知识,想必对这些词汇不会陌生,AngularJS融合了后端开发的一些思想,虽然身为前端框架,但与jQ ...

  6. AngularJS入门Demo

    1 :表达式 <html> <head> <title>入门小Demo-1</title> <script src="angular.m ...

  7. 通过AngularJS实现前端与后台的数据对接(二)——服务(service,$http)篇

    什么是服务? 服务提供了一种能在应用的整个生命周期内保持数据的方法,它能够在控制器之间进行通信,并且能保证数据的一致性. 服务是一个单例对象,在每个应用中只会被实例化一次(被$injector实例化) ...

  8. AngularJs之九(ending......)

    今天继续angularJs,但也是最后一篇关于它的了,基础部分差不多也就这些,后续有机会再写它的提升部分. 今天要写的也是一个基础的选择列表: 一:使用ng-options,数组进行循环. <d ...

  9. AngularJS过滤器filter-保留小数,小数点-$filter

    AngularJS      保留小数 默认是保留3位 固定的套路是 {{deom | number:4}} 意思就是保留小数点 的后四位 在渲染页面的时候 加入这儿个代码 用来精确浮点数,指定小数点 ...

随机推荐

  1. arcgis server manager - An error has occured on the server. For details please check the Event (Application) log on the web.

    当登陆 Arcgis Server Manager的时候,点击 "Services" 中的选项"Manage Services",就报错: An error h ...

  2. 第一个Delphi小程序

    第一次应工作需呀,接触这个语言,今晚在自己的电脑搭建好环境,写的第一个超简单的Delphi小程序! var temp:Integer; //求个位数 procedure TForm1.BitBtn1C ...

  3. (原)windows8.1上使用opencv for python

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/6204100.html 参考网址: http://www.docs.opencv.org/master/ ...

  4. 使用 c# 调用进程相关开发

    最近在维护公司的以前项目中发现,使用到了进程相关知识.现在将此总结,以备后面查看复习. 一.进程查看器     程序在运行的时候,操作系统就会为其分配一个进程.那么进程到底是什么东西呢? 实际上,进程 ...

  5. smarty练习: 设置试题及打印试卷

    数据库表格:shiti, shititimu, timu, kemu, xuanxiang 根据科目设置一个可以添加试题的页面:(如下图) 具体的题目从数据库中查出并形成一张试卷的形式 考试试题设置: ...

  6. 智能的PHP缩图类

    *作者:落梦天蝎(beluckly)*完成时间:2006-12-18*类名:CreatMiniature*功能:生成多种类型的缩略图*基本参数:$srcFile,$echoType*方法用到的参数:$ ...

  7. QQ在线客服

    css代码: .float0831 { POSITION: fixed; TOP: 180px; RIGHT: 1px; _position: absolute } .float0831 A { CO ...

  8. python之6-1常用函数

    1.休眠函数 import time time.sleep(n) n可以是整数或者小数,单位是秒 2.打开文件函数 open('n','m',k) n是文件路径,如果只有文件名,则是py程序所在文件夹 ...

  9. Robot FrameWork 教程链接

    1.  Robot Framework 教程: http://cgmblog.sinaapp.com/html/category/robot-framework 2.  Robot Framework ...

  10. android技术下载

    http://www.linuxidc.com/Linux/2011-08/41339.htm http://linux.linuxidc.com/2011%E5%B9%B4%E8%B5%84%E6% ...