javascript - Ember routes specifying a different root url -


i've application running on wamp server. directory structure looks wamp/www/applicationliveshere i've ember application within same directory , it's structure looks wamp/www/emberapp/applicationliveshere i've set php project using rest can access data using eg. http:localhost/emberapp/videos return videos in database json client. problem in ember i'm unsure how set routes use localhost/emberapp/videos. each time load page controller using localhost/videos , returning 404 not found. using 'ember-data.js' handle models. , have created store follows

videos.store = ds.store.extend({ revision: 12, url: "http://localhost/emberapp/"}) 

my videos route defined

videos.videosroute = ember.route.extend({ model: function(){ return videos.video.find(); } }); 

i have path set follows

videos.router.map(function({ this.resource('videos', {path: '/'}); }); 

so clarify want routes begin http://localhost/emberapp/..... @ moment have http://localhost/....

any ideas?

thanks in advance.

for behavior need should define namespace on adapter additionally url in store.

for example:

app.adapter = ds.restadapter.extend({   namespace: 'emberapp' });  videos.store = ds.store.extend({   revision: 12,    url: "http://localhost/",   adapter: app.adapter }); 

this result in http://localhost/emberapp/ base url. have here info on that.

hope helps.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -