I am very new to EmberJS. I am trying to make a simple Ember CRUD app. I am using Ember Data 's REST adapter. The REST adapter is configured to pull data from a CodeIgniter application.
I have tested the CodeIgniter application and it is serving data correctly.
Here is my Ember code (except the routes)
Here is my router.js file
When I navigate to /users, I get this error:
Error: assertion failed: Error while loading route:
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /users was not found on this server.</p>
</body></html>
, status: 404, statusText: Not Found} @ http://localhost/todo3/js/libs/ember-1.2.0.js:796
A similar error is encountered when I navigate to /departments
Interestingly, if I change the line
App.ApplicationAdapter = DS.RESTAdapter.extend();
to
App.ApplicationAdapter = DS.FixtureAdapter.extend();
and comment out
DS.RESTAdapter.reopen({
url: 'http://localhost/service_r/index.php'
});
and also add some FIXTURE data...(making absolutely no more changes) then the error dissappears and I can see the data.
What is the problem with RestAdapter?