<!doctype html>
<html ng-app="myapp">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="js/Angular.js"></script>
<script>
//控制器注册
var myapp=angular.module("myapp", []).controller("TestController", function($scope) {
$scope.modelReset = function(){
$scope.firstName = "1111";
$scope.lastName = "lww";
$scope.email = "1111@lww.com";
}
});
</script>
</head>
<body>
$dirty:规定值已被改变<br/>
$invalid:该值的状态是无效的<br/>
$error:指出确切的错误<br/>
$dirty 和 $invalid标志做验证的方式。使用novalidate表单声明禁止任何浏览器特定的验证<br/>
ng-include:载入html的片段<br/>
ng-view 标记只是简单地创建一个占位符,是一个相应的视图(HTML或ng-template视图)<br/>
ng-template 指令是用来创建使用script标签的HTML视图。它包含一个用于由$routeProvider映射控制器视图“id”属性。<br/>
<span>模型九</span><br/>
<div ng-controller="TestController">
<input name="firstname" type="text" ng-model="firstName" required>
<input name="lastname" type="text" ng-model="lastName" required>
<input name="email" type="email" ng-model="email" required>
<button ng-click="modelReset()">Reset</button>
</div>
</body>
</html>

AngularJs记录学习02的更多相关文章

  1. AngularJs记录学习01

    <!doctype html> <html ng-app="myapp"> <head> <meta http-equiv="C ...

  2. AngularJs记录学习03

    AngularJs的路由是一个组件,需要自己额外添加,在目录/src/ngRoute中 三个文件route.js,routeParams.js,ngView.js <html> <h ...

  3. AngularJs记录学习04

    <html> <head> <title>Angular JS Views</title> <script src="js/Angula ...

  4. 【iScroll源码学习02】分解iScroll三个核心事件点

    前言 最近两天看到很多的总结性发言,我想想今年好像我的变化挺大的,是不是该晚上来水一发呢?嗯,决定了,晚上来水一发! 上周六,我们简单模拟了下iScroll的实现,周日我们开始了学习iScroll的源 ...

  5. JavaScript学习02 基础语法

    JavaScript学习02 基础语法 JavaScript中很多基础内容和Java中大体上基本一样,所以不需要再单独重复讲了,包括: 各种算术运算符.比较运算符.逻辑运算符: if else语句.s ...

  6. Java虚拟机JVM学习02 类的加载概述

    Java虚拟机JVM学习02 类的加载概述 类的加载 类的加载指的是将类的.class文件中的二进制数据读入到内存中,将其放在运行时数据区的方法区内,然后在堆区创建一个java.lang.Class对 ...

  7. Python学习02 列表 List

    Python学习02 列表 List Python列表 List Python中的列表(List)用逗号分隔,方括号包围(comma-separated values (items) between ...

  8. Android Testing学习02 HelloTesting 项目建立与执行

    Android Testing学习02 HelloTesting 项目建立与执行 Android测试,分为待测试的项目和测试项目,这两个项目会生成两个独立的apk,但是内部,它们会共享同一个进程. 下 ...

  9. Java学习02

    Java学习02 1.导入内部的包 一.在包的下面加入下面一句话: import    java.util.Scanner; 二.在类中 Scanner input=new     Sanner(Sy ...

随机推荐

  1. 性能测试脚本新玩法---fiddler&&Jmeter

    飞测说:最近接触移动项目,测试app,需要做移动app的性能测试,想通过代理来录制,但是jmeter的代理录制效果真心不是很好,自己一个个请求来写代码,太浪时间了,那么有没有其他的办法呢? 我们都知道 ...

  2. 百度校招面试经历及总结(已发offer)

    听说发面经可以攒rp,希望早点给我确定的offer通知,也希望看到这个面经的小伙伴能顺利拿到心仪的offer~ 职位:机器学习-数据挖掘工程师 9.15 上午11点 一面 1.介绍项目 2.考研意向, ...

  3. Xcode去除某种类型的警告

      首先来看下当有警告时,怎么找到警告类型,在某条警告上,右键—>Reveal in Log     下面 [ ] 中间就是警告信息     去除警告信息的几种方式:   一.使用编译器提供的宏 ...

  4. org.apache.ibatis.reflection.ReflectionException

    org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.Reflecti ...

  5. wcscpy wcscpy_s strcpy strcpy_s的区别

    原型声明:extern char *strcpy(char *dest,const char *src); 头文件:string.h 功能:把从src地址开始且含有NULL结束符的字符串赋值到以des ...

  6. myeclipse的一些设置

    常用快捷键 Ctrl + Shift + R 搜索文件Ctrl + Shift + T 搜索类型Ctrl + O 搜索成员   智能提示 Windows > Preferences > G ...

  7. 无法完成安装:'unsupported configuration: hda-duplex not supported in this QEMU binary'

    Linux 有问必答:如何修复"hda-duplex not supported in this QEMU binary" 编译自:http://ask.xmodulo.com/h ...

  8. python 标准库获取网络信息

    c语言ioctl定义的常量 /usr/include/x86_64-linux-gnu/bits/ioctls.h /* Copyright (C) 1996-2015 Free Software F ...

  9. 五、用户数据报传输(UDP)

    1.UDP常用的发送和接收函数 int recvfrom(int sockfd,void *buf,int len,unsigned int flags,struct sockaddr *from,i ...

  10. CThreadPool

    class CThreadPool { public: template <typename T> static void QueueUserWorkItem(void (T::*func ...