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
C:\Users\Gaurav\Documents\Development\js\tictactoe>jitsu deploy | |
info: Welcome to Nodejitsu gaurav0 | |
info: jitsu v0.9.8 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
warn: | |
warn: The package.json file is missing required fields: | |
warn: | |
warn: subdomain, engines | |
warn: |
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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Rebuild to run it on the right | |
var when = require('when'); | |
function print(str) { | |
var p = document.createElement('p'); | |
document.body.appendChild(p); | |
p.innerHTML = str; | |
} |
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
export default Ember.Component.extend(App.AddableMixin, { | |
layoutName: 'components/bar-baz', | |
classNames: ['bar-baz'], | |
_createBaz: function() { | |
Ember.run.schedule('afterRender', function() { | |
console.log(this.$().innerHTML); | |
}.bind(this)); | |
}.on('didInsertElement') | |
}); |
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
export default Ember.TextField.extend({ | |
didInsertElement() { | |
this.$().focus(); | |
this.$().addClass('focus'); // headless testing is brittle | |
} | |
}); |
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 DS from 'ember-data'; | |
export default DS.Adapter.extend({ | |
shouldReloadAll() { | |
//silence ember-data deprecation | |
return true; | |
}, | |
findAll() { | |
// rather then doing an ajax, just echo back the default data |
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' | |
}); |
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
This is a demonstration of how to create a search field in Ember. | |
Results update 400ms after the user stops typing (for a nicer search experience). That's what the debounce does. |
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.Component.extend({ | |
actions: { | |
renderPost() { | |
this.sendAction('renderPost'); | |
}, | |
renderComment() { | |
this.sendAction('renderComment'); | |
} |
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({ | |
actions: { | |
selectFlower() { | |
alert('clicked'); | |
} | |
} | |
}); |
OlderNewer