Skip to content

Instantly share code, notes, and snippets.

View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
myService: Ember.inject.service('my-service'),
appName: 'Ember Twiddle',
init() {
this.get('myService');
}
});
View controllers.application.js
import Ember from 'ember';
import file from '../file';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
variable: file.variable,
adToShow: Ember.computed("file.variable.{catType,listCategory,search}", function() {
if (file.variable.search == true) {
return "ad-search"
}else if (file.variable.listCategory) {
View controllers.application.js
import Ember from 'ember';
import file from '../file';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
adToShow: Ember.computed("file.variable.{catType,listCategory,search}", function() {
if (file.variable.search == true) {
return "ad-search"
}else if (file.variablelistCategory) {
return "ad-listing-details";
View controllers.application.js
import Ember from 'ember';
import file from '../file';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
adToShow: Ember.computed("file.variable.{catType,listCategory,search}", function() {
if (file.variable.search == true) {
return "ad-search"
}else if (file.variablelistCategory) {
return "ad-listing-details";