This application is very incomplete.
cp Config/core.php.default Config/core.php
cp Config/database.php.default Config/database.php
chmod -R 777 tmp
ln -s /path/to/cake-2.2.3/lib/Cake Lib/Cake
CakePHP and Ember.js Demo Application
Thank you for creating this project ...
I'm trying to configure it but I have some problems, the first thing I do is unzip the project on the root of the local server in order to access it under http://localhost:8888/ember-demo-master/. Then I created the db ember_demo and created the tables as /Config/Schema, and I've also added two other tables that I think are essential:
CREATE TABLE `comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`emailHash` varchar(255) NOT NULL,
`website` varchar(255) NOT NULL,
`body` varchar(255) NOT NULL,
`modified` varchar(255) NOT NULL,
`created` varchar(255) NOT NULL,
`post_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE `post` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`body` varchar(255) NOT NULL,
`publishedDate` date NOT NULL,
`modified` date NOT NULL,
`created` date NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
When I access from the browser to http://localhost:8888/ember-demo-master/ I get the following error Network XHR GET http://localhost:8888/api/posts 404 (Not Found)
How do I set the rules of route? I have to change the route of cakephp in Config/routes.php or something in ember?
The application works but of course it does not save and does not read data from db
thank you very much
ย Alessandro
Maybe the request may sound silly but I'm pretty new in ember...
I see that the model Comment is defined and linked to Post in application.js and the route of cakephp is set to /api/posts/:post_id/comments
but I can't find where this is managed ember: It's possible to manage comments from view?
Thanks a lot
Alessandro
I see that if you click on Create Post and than without write anything in the form you will return to the Posts list, ember create a new empty post element. You'll not see it if you have a post list with h3 tag but you will see if you have a view like this one
<script type="text/x-handlebars" data-template-name="posts">
<h2>All Posts View</h2>
<ul>
{{#each post in controller}}
<li><a {{action viewPost post href=true}}>{{post.title}}</a></li>
{{/each}}
</ul>
</script>
I'm sorry but I do not know how to fix it
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.