We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if not
As of #669 we can write something like:
{{if {foo}}} Value of foo is: {foo} {{/if}}
and:
{{if {foo}="bar"}} Value of foo is "bar", check it out: {foo} {{/if}}
We can also compare two attributes if we wish:
{{if {foo}={anotherAttribute}}} Value of foo equals to anotherAttribute's value {foo} {anotherAttribute} {{/if}}
This is not enough for cases where we want to see if a value does not equal to something.
Let's introduce another operator, != that will evaluate to true if its left side does not equal to its right side.
!=
All the examples above will work, we can compare to hard-coded text values as well as between two attribute values:
{{if {foo}!="bar"}} Value of foo is not "bar", check it out: {foo} {{/if}}
The quotation marks around bar are optional. This works exactly the same:
bar
{{if {foo}!=bar}} Value of foo is not "bar", check it out: {foo} {{/if}}
{{if {foo}!={anotherAttribute}}} Value of foo does not equal to anotherAttribute's value: {foo} {anotherAttribute} {{/if}}
The text was updated successfully, but these errors were encountered:
ed581ff
jacobwod
No branches or pull requests
Current situation
As of #669 we can write something like:
and:
We can also compare two attributes if we wish:
This is not enough for cases where we want to see if a value does not equal to something.
Proposed solution
Let's introduce another operator,
!=
that will evaluate to true if its left side does not equal to its right side.All the examples above will work, we can compare to hard-coded text values as well as between two attribute values:
The quotation marks around
bar
are optional. This works exactly the same:We can also compare two attributes if we wish:
The text was updated successfully, but these errors were encountered: