Last active
September 7, 2016 12:33
-
-
Save arturkot/650b6fb3657bf037a40170f3b1e74b84 to your computer and use it in GitHub Desktop.
Query Params test
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: { | |
setArray () { | |
this.set('array', [4, 5]); | |
this.sendAction('performTransition'); | |
}, | |
setNumber () { | |
this.set('number', 3); | |
this.sendAction('performTransition'); | |
}, | |
setBoolean () { | |
this.set('boolean', false); | |
this.sendAction('performTransition'); | |
}, | |
setAll () { | |
this.set('array', [4, 5]); | |
this.set('number', 3); | |
this.set('boolean', false); | |
this.sendAction('performTransition'); | |
}, | |
resetQueryParams () { | |
this.set('array', []); | |
this.set('number', null); | |
this.set('boolean', null); | |
this.sendAction('performTransition'); | |
} | |
} | |
}); |
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', | |
queryParams: ['array', 'number', 'boolean'], | |
array: [], | |
number: null, | |
boolean: null, | |
typeOfArray: Ember.computed('array', function () { | |
return Ember.typeOf( this.get('array') ); | |
}), | |
typeOfNumber: Ember.computed('number', function () { | |
return Ember.typeOf( this.get('number') ); | |
}), | |
typeOfBoolean: Ember.computed('boolean', function () { | |
return Ember.typeOf( this.get('boolean') ); | |
}) | |
}); |
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({ | |
}); |
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'; | |
import config from './config/environment'; | |
const Router = Ember.Router.extend({ | |
location: 'none' | |
}); | |
Router.map(function() { | |
this.route('my-route'); | |
}); | |
export default Router; |
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.Route.extend(); |
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.Route.extend({ | |
controllerName: 'application', | |
actions: { | |
performTransition () { | |
this.transitionTo('application'); | |
} | |
} | |
}); |
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.8.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.5.1", | |
"ember-data": "2.5.2", | |
"ember-template-compiler": "2.5.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment