Last active
August 30, 2016 08:00
-
-
Save kumkanillam/d3bcb5e020400390e87184aed6267ff0 to your computer and use it in GitHub Desktop.
Demo Run loop
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'; | |
/* | |
function search(){ | |
console.log('search'); | |
} | |
Ember.run.debounce(this,search,300); | |
*/ | |
export default Ember.Controller.extend({ | |
myService: Ember.inject.service(), | |
appName: 'Ember Twiddle', | |
search(){ | |
console.log('search'); | |
}, | |
init() | |
{ | |
this._super(...arguments); | |
console.log('init '); | |
//Ember.run.schedule('actions',this.get('myService').print,2000); | |
}, | |
actions:{ | |
onkeyupEvent(){ | |
console.log('onkeyupEvent'); | |
Ember.run.debounce(this,this.search,300); | |
}, | |
} | |
}); |
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.Service.extend({ | |
name:'my-service-name', | |
print(ref){ | |
console.log('hi'); | |
} | |
}); |
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.10.4", | |
"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.7.0", | |
"ember-data": "2.7.0", | |
"ember-template-compiler": "2.7.0" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment