Skip to content

Instantly share code, notes, and snippets.

@ctataryn
Created July 29, 2017 15:15
Show Gist options
  • Save ctataryn/f682405a402f14899391a7766eb6bb86 to your computer and use it in GitHub Desktop.
Save ctataryn/f682405a402f14899391a7766eb6bb86 to your computer and use it in GitHub Desktop.
Problem with constants service use in a template
// /app/templates/create-account.hbs
{{#if constants.allowNewRegistration}}
<form {{action 'createAccount' on='submit'}}>
{{/if}}
// /app/controllers/create-account.js
export default Ember.Controller.extend( {
ajax: Ember.inject.service(),
session: Ember.inject.service(),
constants: Ember.inject.service(),
.
.
.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment