Comments (14)
@plimeyepea: You missed one parenthese at the end, that's why it broke your application!
One parenthese to close the not-eq
helper, one parenthese to close the or-helper
=> So in full:
{{#if (or (not-eq currentRouteName "index") (not-eq currentRouteName "signup")) }}
{{partial 'navigation'}}
{{/if}}
from ember-truth-helpers.
I just added a test that demonstrates that this works
from ember-truth-helpers.
Did you try {{#if (or (not-eq a b) (not-eq a b))}}hello{{/if}}
or {{if (or (not-eq a b) (not-eq a b)) 'hello'}}
from ember-truth-helpers.
That is exactly what I did, but it doesn't seem to like it very much. If I just do a single comparison it works, but not with the double.
from ember-truth-helpers.
Can you try {{if (or (not-eq true true) (not-eq false true)) 'hello'}}
? This has to work.
from ember-truth-helpers.
you could try (not (eq a b) (eq c d))
?
from ember-truth-helpers.
@plimeyepea - Can you express the logic in JS so that we can properly understand what you are trying to do?
from ember-truth-helpers.
I was trying to check to see if my currentRouteName is a certain route. So there's two routes I needed to check:
{{#if (or (not-eq currentRouteName "index") (not-eq currentRouteName "signup")}}
{{partial 'navigation'}}
{{/if}}
However, when I added in the second (not-eq ... "signup"), it breaks my application.
from ember-truth-helpers.
I think something like this will be useful
from ember-truth-helpers.
and not-any
from ember-truth-helpers.
This feature will be really useful, some like that:
{{#if (or (eq a b c) (not-eq c d) (gt f g))}}
{{ model.var }}
{{/if}}
etc...
from ember-truth-helpers.
+1
from ember-truth-helpers.
{{#if (and (or trueProperty falseProperty) (not falseProperty)}} does not work correctly. Should come out true but it's false.
from ember-truth-helpers.
{{#if (and (or trueProperty falseProperty) (not falseProperty)}} does not work correctly. Should come out true but it's false.
That is also missing a closing parenthesis
from ember-truth-helpers.
Related Issues (20)
- Helper "not" has wrong value when passing PromiseProxy
- not-eq has unknown reexport HOT 1
- Helper is-empty returns false when passing undefined
- Update to ember-cli-babel@7 HOT 2
- `or` doesn't work the same way as `||` in JavaScript HOT 3
- Update `README` to note that `or`, `and` and `xor` **do** short-circuit HOT 2
- Short-circuit Problem With `SafeString` Using `or` (And Maybe Other Helper)
- Ember Global Deprecation Warning HOT 1
- `or` cant be used when or condition value can be `false` HOT 7
- Project maintenance HOT 4
- Typescript conversion HOT 1
- Can't `npm i` master branch to use with `ember-template-imports` HOT 2
- Cut a release? HOT 12
- Incorrect glint return type for `or` helper in 4.0.0-beta.0 HOT 2
- [QUESTION] `ember-source` compat HOT 3
- `and` returns non-boolean value rather than converting it (which breaks default value logic)
- New release - 2.1.0? HOT 6
- Does not handle aysnc conditions HOT 3
- Array.includes helper? HOT 3
- is-array helper is returning false when array only has one object inside it. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-truth-helpers.