ember-old-router

Emberjs route with args fail in some case

不打扰是莪最后的温柔 提交于 2019-12-12 18:52:29
问题 In some case I got an issue with the routing url. Here's my router : contacts: Em.Route.extend({ route: '/contacts', index: Em.Route.extend({ route: '/', connectOutlets: function(router, context) { App.contactsController.populate() var appController = router.get('applicationController'); appController.connectOutlet('contactsList'); } }), show: Em.Route.extend({ route: '/:contactid', connectOutlets: function(router, context) { alert('show contact'); } }), doShowContact: function(router, event)

EmberJs: how to use connectOutlet

[亡魂溺海] 提交于 2019-12-11 15:05:21
问题 I've created a simple test in which I try to use connectOutlet. However, not much is rendered. Here is my test code: http://jsfiddle.net/jeanluca/53dpA/ Just to summarize the application. I think the problems is inside the following code App.Router.map(function(match) { match('/').to('index'); }); App.IndexRoute = Em.Route.extend({ connectOutlets: function(router) { router.get('applicationController').connectOutlet('sidebar', 'navigation'); router.get('applicationController').connectOutlet(

Url contains 'undefined' instead of id after navigating back from 'edit' to 'show'

人走茶凉 提交于 2019-12-10 10:20:27
问题 I read the Ember Application Structure guide and now I trying to create a simple one page application with ember.js. My home page shows a sidebar containing a list of Post objects. When I click on a list-item, on the right of the sidebar I show a read-only version of the selected item. This version has a 'Edit' button, which makes it possible to edit the item. The edit version has a 'Cancel' link to switch back to the read-only version. I got this all working, however, when navigating back to

Getting Start with Ember.js Router

天涯浪子 提交于 2019-12-07 07:27:06
问题 I want to learn using Ember.js for my next project. So far I have read the documentation here but I saw no explanation about Router. Then I read the guide here but I still don't understand how to use Router properly. I tried using Router this way, I want 2 route: /login which displays a button to enter the second route /home which displays a button to enter the first route This is just a very simple code to test using Router to switch between "pages". I tried using this code but all I get is

Router / StateManager - can't make it work

拟墨画扇 提交于 2019-12-06 16:15:20
问题 I've been trying to implement a router as specified in this guide, but I can't make it work. Can anyone give a quick code sample using the latest version of Ember to enable a router that supports routing through urls? 回答1: Here is a one with ember latest, still prone to changes :) http://jsfiddle.net/C7LrM/86/ posted by @mediastuttgart The comments section of this Gist by wycats looks like the place where you can get updated fiddles :) https://gist.github.com/2728699#comments This example

Url contains 'undefined' instead of id after navigating back from 'edit' to 'show'

别等时光非礼了梦想. 提交于 2019-12-05 21:46:32
I read the Ember Application Structure guide and now I trying to create a simple one page application with ember.js. My home page shows a sidebar containing a list of Post objects. When I click on a list-item, on the right of the sidebar I show a read-only version of the selected item. This version has a 'Edit' button, which makes it possible to edit the item. The edit version has a 'Cancel' link to switch back to the read-only version. I got this all working, however, when navigating back to the read-only version, the url in the address bar is not updated properly. When navigating back to my

Getting Start with Ember.js Router

£可爱£侵袭症+ 提交于 2019-12-05 12:02:43
I want to learn using Ember.js for my next project. So far I have read the documentation here but I saw no explanation about Router. Then I read the guide here but I still don't understand how to use Router properly. I tried using Router this way, I want 2 route: /login which displays a button to enter the second route /home which displays a button to enter the first route This is just a very simple code to test using Router to switch between "pages". I tried using this code but all I get is a blank page: <script src="js/libs/jquery-1.7.2.min.js"></script> <script src="js/libs/handlebars-1.0.0

Router / StateManager - can't make it work

大憨熊 提交于 2019-12-04 20:59:43
I've been trying to implement a router as specified in this guide , but I can't make it work. Can anyone give a quick code sample using the latest version of Ember to enable a router that supports routing through urls? Here is a one with ember latest, still prone to changes :) http://jsfiddle.net/C7LrM/86/ posted by @mediastuttgart The comments section of this Gist by wycats looks like the place where you can get updated fiddles :) https://gist.github.com/2728699#comments This example uses: handlebars-1.0.0.beta.6.js Ember latest as of now: // Version: v0.9.8.1-484-g73ac0a4 // Last commit:

How can i set the ApplicationController in Ember.Router

荒凉一梦 提交于 2019-12-04 08:21:11
I there any other possibility to handle with Ember.Router controllers and views? My app structure generally depends on require.js which takes care of the corresponding dependencies. In my example i'm doing the App.ApplicationController thing as the main router controller. Here's a jsfiddle: http://jsfiddle.net/mediastuttgart/uMKGt/1/ But is there any chance to set this manually? I've found this commit message https://github.com/emberjs/ember.js/commit/be69395f5eec4187b1df052d7386bcda45f79475 where i can see, how to set the controller and view manually (anyway couldn't get this working). But

Ember.js Router App Architecture — How to have multiple nested view/controller pairs

荒凉一梦 提交于 2019-12-03 07:52:53
问题 I have an ember app and the concept of the outlet and connecting the outlet is fine, I get that. What I don't understand is how to have more than one view/controller view inside of another one without insane nesting Suppose I am designing icloud clone where I have email functionality and a photo gallery functionality. Now if I wanted to accomplish something like *********************************************************** * INBOX LIST ** COMPOSE OR VIEW MESSAGE * * ** * * ** * * ** * * ** * *