Trying to use ember-validations plugin for ember-cli. Bumped with this issue that I can't figure what is missing.
Here is the dependencies part in my package.json:
"devDependencies": {
"broccoli-asset-rev": "^2.0.0",
"broccoli-ember-hbs-template-compiler": "^1.6.1",
"ember-cli": "0.1.9",
"ember-cli-6to5": "0.2.1",
"ember-cli-content-security-policy": "0.3.0",
"ember-cli-dependency-checker": "0.0.7",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-qunit": "0.1.2",
"ember-data": "1.0.0-beta.12",
"ember-export-application-global": "^1.0.0",
"express": "^4.8.5",
"glob": "^4.0.5",
"ember-validations": "~2.0.0-alpha.2" //Also tried with "~ 2.0.0" as advised in the guide
}
And a simple controller which looks like this:
import Ember from 'ember';
import EmberValidations from 'ember-validations';
export default Ember.Controller.extend(EmberValidations.Mixin, {
actions: {
//....
},
validations: {
mailid: {
presence: true
},
password: {
presence: true
}
}
});
But looking the route in the browser gets an error message in the console:
Could not find module ember-validations
Not sure what I'm doing wrong. Any help appreciated.
Aucun commentaire:
Enregistrer un commentaire