Function
and (args) : Unknown public
Module:
@ember/helper
Defined in packages/@ember/helper/index.ts:768
Available since v7.1.0
- args
- Unknown
Two or more values to evaluate
- returns
- Unknown
The first falsy value or the last value
The {{and}} helper evaluates arguments left to right, returning the first
falsy value (using Handlebars truthiness) or the right-most value if all
are truthy. Requires at least two arguments.
<template>
{{if (and @isAdmin @isLoggedIn) "Welcome, admin!" "Access denied"}}
</template>
The and helper is available as a keyword and does not need to be imported.