Created
July 25, 2016 21:12
-
-
Save dbouwman/730481f60f11a1e53a2f05bab472bed0 to your computer and use it in GitHub Desktop.
New Twiddle
This file contains 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'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
attr: { | |
"type":{ | |
"label":"Type", | |
"fieldType":"esriFieldTypeString" | |
}, | |
"date":{ | |
"label":"Type", | |
"fieldType":"esriFieldTypeDate" | |
}, | |
"address":{ | |
"label":"Address", | |
"fieldType":"esriFieldTypeString" | |
} | |
}, | |
mappings: { | |
"type":{ | |
"field":"CRIMTYP" | |
}, | |
"date":{ | |
"field":"OCCURED_ON" | |
}, | |
"address":{ | |
"field":"ADDR" | |
} | |
}, | |
attrJson:Ember.computed('attr',function(){ | |
return JSON.stringify( this.get('attr'), null, 4); | |
}), | |
mappingsJson:Ember.computed('mappings',function(){ | |
return JSON.stringify( this.get('mappings'), null, 4); | |
}), | |
merged: Ember.computed('attr',function(){ | |
return $.extend(true, this.get('attr'), this.get('mappings') ); | |
}), | |
mergedJson: Ember.computed('merged',function(){ | |
return JSON.stringify( this.get('merged'), null, 4); | |
}) | |
}); |
This file contains 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.10.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.6.0", | |
"ember-data": "2.6.1", | |
"ember-template-compiler": "2.6.0" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment