ember.js: prepare code to move from ember 1.x to ember 2.0 -


my question is: can direct me in moving controller based application component base application?

i building map application dog training club. specialized in helping finding missing people. in order organize our training, need application draw trails , add items on them etc.

i've started app using ember-cli , openlayers-3. application working nicely, move code controller based component base approach.

i use more routing @ moment, have 1 route , user interactions handled using actions.

i've setup repository on github kind enough me:

https://github.com/mylen/mantrailling

if want checkout code , test app localy, you'll need modify referer using header mod in navigator use http://demo.melard.fr

you can see beta of website @ page :

http://recherche.utilitaire.melard.fr/beta/map

thank in advance,

first, should clarify intended uses of components, controllers , routes in ember.js.

components similar views, isolated , therefore used create reusable pieces of code, handle visual representation of models.

controllers used decorate models, hold application state.

routes represent current application state. responsible loading models , initialize controllers.

to solve first problem (controllers -> components), need move view related stuff, , this, components. code decorate model, example active flag of way-point, remains in controller. need bind data of models/controllers components, via embers data binding. (http://guides.emberjs.com/v1.11.0/components/passing-properties-to-a-component)

your second problem (use routes) bit harder solve, think. first need find of states app have. after that, should move model loading , saving stuff routes.

edit references describing problem.

https://github.com/ef4/rfcs/blob/routeable-components/active/0000-routeable-components.md

https://www.youtube.com/watch?v=qgycdzjonig

edit 2 question highly related how move ember 1.x 2.0, because changes mentioned come along ember 2.0.

here additional links describe how prepare best upgrade.

https://gist.github.com/samselikoff/1d7300ce59d216fdaf97

https://speakerdeck.com/tomdale/ember-2-dot-0-in-practice

http://discuss.emberjs.com/t/what-is-a-good-way-to-do-this-in-ember-2-0-no-itemcontroller-no-arraycontroller/6649

you can find lot of resources if search ember 2.0.

edit 3 here think informative source keeping new ember releases: https://www.youtube.com/watch?v=wsydqzqf4ww


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -