By Kyle Burns, Scott Isaacs
Discover ways to make extra effective apps, with only one language!
* comprises various hands-on examples
* Explains implementation of real-time apps together with Socket. IO and HTML5, and WebSockets
* Addresses useful Node. js benefits from particular layout choices
* contains an interactive on-line part with pattern chapters
* Explains elements of stand out apps together with brevity and benchmarks
- .net (December 2015)
- AngularJS: Novice to Ninja
- Learning from jQuery: Building on Core Skills
The server-side collection pulled the posts from Mongo, passed them over the wire to our client-side collection, and our Spacebars helper passed them into the template. Now, we’ll take this one step further; let’s add another post via the console: ! com' }); Browser console Look back at the browser – you should see this: Adding posts via the console You have just seen reactivity in action for the first time. find() cursor, it knew how to observe that cursor for changes, and patch the HTML in the simplest way to display the correct data on screen.
That data would normally come from the database, but since we haven’t seen how to do that yet (wait for the next chapter) we’re “cheating” by using static data. helpers() function to define a template helper called posts that simply returns our postsData array. html So our template will be able to iterate over our postsData array, and send each object contained within to the postItem template. js Commit 3-2 Setup a `domain` helper on the `postItem`. View on GitHub Launch Instance This time our domain helper’s value is not an array, but an anonymous function.