Created
August 16, 2018 11:45
-
-
Save jelhan/eeb4e12e66b114c12e7204b218d359a2 to your computer and use it in GitHub Desktop.
ember-changeset and moment objects if not using template helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import { computed } from '@ember/object'; | |
import Changeset from 'ember-changeset'; | |
import moment from 'moment'; | |
export default Ember.Controller.extend({ | |
changeset: computed(() => { | |
let c = new Changeset({}); | |
c.set('date', moment()); | |
return c; | |
}) | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.15.0", | |
"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.2.2", | |
"ember-template-compiler": "3.2.2", | |
"ember-testing": "3.2.2" | |
}, | |
"addons": { | |
"ember-changeset": "1.5.0-beta.0", | |
"ember-cli-moment-shim": "3.7.1", | |
"ember-moment": "7.6.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment