Spark Data Annotation and Data Contexts

In this episode we'll see how the Data annotation works and what a "data context" means

Good job! That's it for "Spark Data Annotation and Data Contexts."

Need a second look? Watch again

Spark Data Annotation and Data Contexts

In this episode we'll see how the Data annotation works and what a "data context" means.

  • Meteor
  • Tutorial
We'll cover a few topics related to data contexts: 1. First we'll create our own data annotation with `Spark.setDataContext`. 2. Second, we'll see how to get a data context for an HTML node using `Spark.getDataContext`. 3. Third, we'll see how a data context works with the `{{#each context}}` block helper. 4. Finally, we'll look at how data contexts are used in event handlers. In other words, what does `this` point to in an event handler? We'll even write our own helper function to grab parent data contexts and merge them! **Related lessons:** * <a href="http://www.eventedmind.com/posts/meteor-spark-event-annotations" target="_blank">Spark Event Annotations</a> * <a href="http://www.eventedmind.com/posts/meteor-spark-annotation-functions" target="_blank">Spark Annotation Functions</a> * <a href="http://www.eventedmind.com/posts/meteor-introduction-to-rendering" target="_blank">Introduction to Rendering</a> * <a href="http://www.eventedmind.com/posts/meteor-rendering-template-functions" target="_blank">Rendering Template Functions</a> * <a href="http://www.eventedmind.com/posts/handlebars-block-helpers" target="_blank">Handlebars - Block Helpers</a>
Join the Discussion

Want to leave a comment? .