Skip to content

Instantly share code, notes, and snippets.

@buschtoens
Last active January 16, 2019 11:16
Show Gist options
  • Save buschtoens/f178e6a099aa8669b620e3b3c897a53f to your computer and use it in GitHub Desktop.
Save buschtoens/f178e6a099aa8669b620e3b3c897a53f to your computer and use it in GitHub Desktop.
empty htmlSafe truthiness
import Ember from 'ember';
export default Ember.Controller.extend({
htmlSafeEmpty: Ember.String.htmlSafe(''),
stringEmpty: '',
arrayEmpty: []
});
htmlSafeEmpty: {{if htmlSafeEmpty 'true' 'false'}}
<br>
stringEmpty: {{if stringEmpty 'true' 'false'}}
<br>
arrayEmpty: {{if arrayEmpty 'true' 'false'}}
{
"version": "0.15.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js",
"ember": "3.4.3",
"ember-template-compiler": "3.4.3",
"ember-testing": "3.4.3"
},
"addons": {
"ember-data": "3.4.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment