Last active
August 29, 2017 09:43
-
-
Save abhilashlr/368429ddd245fe269d336012a4c5867a to your computer and use it in GitHub Desktop.
Route QP
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 QueryParams from 'ember-parachute'; | |
const XQueryParams = new QueryParams({ | |
something: { | |
defaultValue: 'x', | |
refresh: true | |
} | |
}); | |
export default Ember.Controller.extend(XQueryParams.Mixin, { | |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
setupController(controller, model) { | |
this._super(controller, model); | |
} | |
}); |
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', | |
rootURL: config.rootURL | |
}); | |
Router.map(function() { | |
this.route('my-route', { | |
resetNamespace: true, | |
path: 'max', | |
}, function() { | |
this.route('list', { | |
path: '/:id/k' | |
}); | |
}); | |
}); | |
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({ | |
controllerName: 'new-controller', | |
model(params) { | |
}, | |
setupController(controller, model) { | |
console.log(controller, model); | |
controller.set('something', 'y'); | |
this._super(controller, model); | |
}, | |
resetController(controller, isExiting) { | |
if (isExiting) { | |
controller.set('something', 'v'); | |
} | |
} | |
}); |
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.12.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.4.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0" | |
}, | |
"addons": { | |
"ember-data": "2.4.3", | |
"ember-parachute": "0.3.1", | |
"ember-cli-shims": 0.1.0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment