angular.bind

Improve this Doc View Source angular.bind

  1. function in module ng

Returns a function which calls function fn bound to self (self becomes the this for fn). You can supply optional args that are prebound to the function. This feature is also known as partial application, as distinguished from function currying.

Usage

angular.bind(self, fn, args);

Arguments

Param Type Details
self Object

Context which fn should be evaluated in.

fn function()

Function to be bound.

args *

Optional arguments to be prebound to the fn function call.

Returns

function()

Function that wraps the fn with all the specified bindings.

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.6.4/docs/api/ng/function/angular.bind

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部