tildeio / bloggr-client Goto Github PK
View Code? Open in Web Editor NEWThe Source for the Ember Get Excited Video
The Source for the Ember Get Excited Video
I've updated this for the ember-cli here: https://github.com/balupton/ember-cli-blog
It would be nice to have a "Create Post" Feature added to the example that shows the ember way of doing this.
How to replicate:
Screencast at 25:35 cuts off the end of line 12 and line 23 of app.js. What is the code to complete the ".then(function(..." on those lines?
I am new to Ember. I saw your video to start with. i have a question. For example a user comes and click on the post. Now he clicks on about. After that he comes back to the posts. Shouldn't he see the post opened that he clicked before going to about? The whole idea isn't the state of the template remain intact when you switch between templates?
I just want to point out that the code presented here isn't the final result of the video http://www.youtube.com/watch?feature=player_embedded&v=Ga99hMi7wfY I don't know if that is intentional or not, but having the final result of the video without actually typing and making all the changes would be helpful.
For the sake of semantics and (minimally) lowered barriers to entry.
If you switch to using live data as the video shows, when you hit a "deep link" directly rather than navigating to it, you get an error.
Per the video, change the post route to...
App.PostsRoute = Ember.Route.extend({
model: function() {
return $.getJSON('http://tomdale.net/api/get_recent_posts/?callback=?').then(function(data) {
return data.posts.map(function(post) {
post.body = post.content;
return post;
});
});
}
});
Now go direct (don't navigate via the UI) to /index.html#/posts/875
You will see the following error in the console...
Error while loading route:
ReferenceError {stack: (...), message: "posts is not defined"}
I thought that posts was a Promise?
How do you get around this in Ember.js ?
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.