- 
      
- 
        Save rwjblue/2d80d71daa9a9a99676aef471cb55b90 to your computer and use it in GitHub Desktop. 
    New Twiddle
  
        
  
    
      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', | |
| queryParams: ['categories', 'serachQuery'], | |
| categories: [], | |
| serachQuery: '', | |
| actions: { | |
| addCategory() { | |
| this.get('categories').pushObject(1); | |
| } | |
| }, | |
| }); | 
  
    
      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.Route.extend({ | |
| queryParams: { | |
| categories: { | |
| type: 'array', | |
| refreshModel: true, | |
| }, | |
| searchQuery: { | |
| refreshModel: true, | |
| } | |
| }, | |
| model(params) { | |
| console.log('categories', params.categories); | |
| return new Promise(resolve => setTimeout(resolve, 1000)).then(() => new Date); | |
| }, | |
| actions: { | |
| willTransition() { | |
| console.log('willTransition'); | |
| }, | |
| didTransition() { | |
| console.log('didTransition'); | |
| }, | |
| }, | |
| }); | 
  
    
      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.12.1", | |
| "EmberENV": { | |
| "FEATURES": {} | |
| }, | |
| "options": { | |
| "use_pods": false, | |
| "enable-testing": false | |
| }, | |
| "dependencies": { | |
| "ember": "3.22.1", | |
| "ember-template-compiler": "3.22.1", | |
| "ember-testing": "3.22.1" | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment