Function
lt (dependentKey, value) ComputedProperty public
Module: | @ember/object |
---|
Defined in packages/ember-runtime/lib/computed/computed_macros.js:370
import { lt } from '@ember/object/computed';
- dependentKey
- String
- value
- Number
- returns
- ComputedProperty
- computed property which returns true if the original value for property is less then given value.
A computed property that returns true if the provided dependent property is less than the provided value.
Example
let Hamster = Ember.Object.extend({ needsMoreBananas: Ember.computed.lt('numBananas', 3) }); let hamster = Hamster.create(); hamster.get('needsMoreBananas'); // true hamster.set('numBananas', 3); hamster.get('needsMoreBananas'); // false hamster.set('numBananas', 2); hamster.get('needsMoreBananas'); // true
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/2.18/functions/@ember%2Fobject%2Fcomputed/lt