闲着无聊怕手生 小练习

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body ng-app="">

<div> AngularJs bing</div>
    <script>
  var self = {name:'boyi'};
    var f = angular.bind(self,function(age){
    alert(this.name+' is '+age+'!');
  },
  '15');
  f();
  var m = angular.bind(self,function(age){
  alert(this.name+' is '+age+'!');
  });
  m(3);
   </script>
</body>
</html>

AngularJS bind的更多相关文章

  1. angularjs bind与model配合双向绑定 表达式方法输出

    <!doctype html><html lang="en"><head> <meta charset="UTF-8" ...

  2. 深入理解 AngularJS 的 Scope

    JavaScript 的原型继承就是奇葩. 之前在 V2EX 上看到讨论说,不会 OOP 的 JavaScript 的程序员就是野生程序员.看来我是属于野生的.   一.遇到的问题 问题发生在使用 A ...

  3. 理解AngularJS的作用域Scope

    AngularJS中,子作用域一般都会通过JavaScript原型继承机制继承其父作用域的属性和方法.但有一个例外:在directive中使用scope: { ... },这种方式创建的作用域是一个独 ...

  4. 深入理解 AngularJS 的 Scope(转)

    一.遇到的问题 问题发生在使用 AngularJS 嵌套 Controller 的时候.因为每个 Controller 都有它对应的 Scope(相当于作用域.控制范围),所以 Controller ...

  5. 转: 深入理解 AngularJS 的 Scope

      查看 DEMO.参考 StackOverflow. ng-switch ng-switch 的原型继承和 ng-include 一样.所以如果你需要对基本类型数据进行双向绑定,使用 $parent ...

  6. angularJS 系列(一)

    angularJS 中 $scope 的原型 和 原型继承之间的细微差别是什么? 参考:http://stackoverflow.com/questions/14049480/what-are-the ...

  7. 转深入理解 AngularJS 的 Scope作用域

    文章转载英文:what-are-the-nuances-of-scope-prototypal-prototypical-inheritance-in-angularjs 中文:http://www. ...

  8. angularjs 中的scope继承关系——(2)

    转自:http://www.lovelucy.info/understanding-scopes-in-angularjs.html angularjs 中的scope继承关系 ng-include ...

  9. 夺命雷公狗—angularjs—22—bind改指向和传参方式

    在angularjs中的传参的jquery的方式是极度相似的噢,而且还可以通过bind来改变指向 <!DOCTYPE html> <html lang="en" ...

随机推荐

  1. JDBC数据库编程:PreparedStatement接口

    使用PreparedStatement进行数据库的更新及查询操作. PreparedStatement PreparedStatement是statement子接口.属于预处理. 使用statemen ...

  2. 关于ThreadLocal变量的一个坑

    每个线程都有一个ThreadLocalMap对象,ThreadLocalMap是Thread的一个内部类,可以把ThreadLocalMap理解成一个Map,这个Map里存放这一个Thread的所有线 ...

  3. cpu时间 / cpu利用率计算

    CPU时间即反映CPU全速工作时完成该进程所花费的时间 cpu时间计算CPU TIME = (# of CPU Clock Cycles) x Clock Period     // “#” 表示消耗 ...

  4. spring jdbc查询 依赖JdbcTemplate这个类模版封装JDBC的操作

    package cn.itcast.spring.jdbc; import java.util.List; import org.springframework.jdbc.core.support.J ...

  5. vs2017安装过程问题及解决方法

    1. 问题:C++ 无法打开 源 文件 "errno.h"等文件 解决方法:https://jingyan.baidu.com/article/8ebacdf0167b2249f6 ...

  6. Google两步验证安装使用方法

    http://www.williamlong.info/archives/2754.html

  7. 读取properties属性文件——国际化

    public class PropertiesInfo { /** * PropertiesInfo实例 */ private static PropertiesInfo pi = null; pri ...

  8. 远程调试 Weinre

    什么是远程调试? 说白了,就是可以通过PC端[F12开发者工具]查看并调试移动端的页面内容,如html.css.js.Network资源等. 重要的事情说三遍:weinre所占有的端口不需要和监听页面 ...

  9. C语言 fork

    /* *@author cody *@date 2014-08-12 *@description */ /* #include <sys/types.h> #include <uni ...

  10. sql中的SET NOCOUNT ON/OFF

    当 SET NOCOUNT 为 ON 时,不返回计数(表示受Transact-SQL 语句影响的行数). 当 SET NOCOUNT 为 OFF 时,返回计数(默认为OFF). 即使当 SET NOC ...