Evented#one()

one (name, target, method) public

Defined in packages/ember-runtime/lib/mixins/evented.js:78

Subscribes a function to a named event and then cancels the subscription after the first time the event is triggered. It is good to use one when you only care about the first time an event has taken place.

This function takes an optional 2nd argument that will become the "this" value for the callback. If this argument is passed then the 3rd argument becomes the function.

Parameters:

name String
The name of the event
target [Object]
The "this" binding for the callback
method Function
The callback to execute

Returns:

this
doc_EmberJs
2016-11-30 16:52:06
Comments
Leave a Comment

Please login to continue.