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'; | |
| export default Ember.Component.extend({ | |
| tagName: 'span', | |
| didRender() { | |
| this._super(); | |
| Ember.run.later(() => { | |
| this.set('tagName', 'h1') | |
| console.log(this.get('tagName')); | |
| this.rerender(); |
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'; | |
| export default Ember.Controller.extend({ | |
| setupExperiment: function() { | |
| // Attaching comment to post | |
| //let pictureComment = this.store.createRecord('picture-comment'); | |
| //let videoPost = this.store.createRecord('video-post', { | |
| // comments: [ pictureComment ] | |
| //}); |
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'; | |
| export default Ember.Controller.extend({ | |
| appName:'Ember Twiddle', | |
| someArray: [ 'one', 'two', 'three' ], | |
| anotherArray: [ 'one', 'four' ], | |
| arrayOfArrays: function() { | |
| return [ this.get('someArray'), this.get('anotherArray') ]; |
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
| FormController = Ember.Controller.extend({ | |
| validation: { | |
| email: { | |
| presence: true, | |
| format: { | |
| type: 'email', | |
| message: 'Whoops, you’ll need your email to sign up. Looks like you missed it here.' | |
| } | |
| } |
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
| FormController = Ember.Controller.extend({ | |
| validation: { | |
| email: { | |
| presence: true, | |
| format: 'email' | |
| } | |
| } | |
| }); |
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
| ember-cli-build-notifications | |
| ember-cli-deploy | |
| ember-cli-document-title | |
| ember-cli-fontcustom | |
| ember-cli-mocha | |
| ember-cli-sass | |
| ember-cli-velocity | |
| ember-data-route | |
| ember-moment | |
| ember-wormhole |
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
| // In lib/models/projects ... | |
| Project.prototype.addIfAddon = function(addonPath, parentAddonName) { | |
| var pkgPath = path.join(addonPath, 'package.json'); | |
| if(fs.existsSync(pkgPath)) { | |
| var addonPkg = require(pkgPath); | |
| var addonName = addonPkg.name + '@' + addonPkg.version | |
| var keywords = addonPkg.keywords || []; | |
| var addonConfig; |
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
| // See it in action: | |
| // http://codepen.io/anon/pen/Hwemg | |
| // Creates a map called `$palettes` and a function called `palette`. | |
| // Call `palette` with a color name and optional tint: | |
| // | |
| // .my-div { | |
| // color: palette(primary, lighter); | |
| // } | |
| // |