Blaze.getData

Client Blaze.getData([elementOrView]) import { Blaze } from 'meteor/blaze' Source Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template. Arguments elementOrView DOM Element or Blaze.View Optional. An element that was rendered by a Meteor, or a View.

Blaze.Each

Client Blaze.Each(argFunc, contentFunc, [elseFunc]) import { Blaze } from 'meteor/blaze' Source Constructs a View that renders contentFunc for each item in a sequence. Arguments argFunc Function A function to reactively re-run. The function can return one of two options: An object with two fields: '_variable' and '_sequence'. Each iterates over '_sequence', it may be a Cursor, an array, null, or undefined. Inside the Each body you will be able to get the current item from the sequen

Blaze.currentView

Client Blaze.currentView import { Blaze } from 'meteor/blaze' Source The View corresponding to the current template helper, event handler, callback, or autorun. If there isn't one, null.

Blaze

After reading this guide, you’ll know: How to use the Spacebars language to define templates rendered by the Blaze engine. Best practices for writing reusable components in Blaze. How the Blaze rendering engine works under the hood and some advanced techniques for using it. How to test Blaze templates. Blaze is Meteor’s built-in reactive rendering library. Usually, templates are written in Spacebars, a variant of Handlebars designed to take advantage of Tracker, Meteor’s reactivity system. Th

audit-argument-checks

audit-argument-checks This package causes Meteor to require that all arguments passed to methods and publish functions are checked. Any method that does not pass each one of its arguments to check will throw an error, which will be logged on the server and which will appear to the client as a 500 Internal server error. This is a simple way to help ensure that your app has complete check coverage. Methods and publish functions that do not need to validate their arguments can simply run check(ar

Assets.getText

Server Assets.getText(assetPath, [asyncCallback]) Retrieve the contents of the static server asset as a UTF8-encoded string. Arguments assetPath String The path of the asset, relative to the application's private subdirectory. asyncCallback Function Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

Assets.getBinary

Server Assets.getBinary(assetPath, [asyncCallback]) Retrieve the contents of the static server asset as an EJSON Binary. Arguments assetPath String The path of the asset, relative to the application's private subdirectory. asyncCallback Function Optional callback, which is called asynchronously with the error or result after the function is complete. If not provided, the function runs synchronously.

Application structure

After reading this article, you’ll know: How a Meteor application compares to other types of applications in terms of file structure. How to organize your application both for small and larger applications. How to format your code and name the parts of your application in consistent and maintainable ways. Universal JavaScript Meteor is a full-stack framework for building JavaScript applications. This means Meteor applications differ from most applications in that they include code that runs o

appcache

appcache The appcache package stores the static parts of a Meteor application (the client side Javascript, HTML, CSS, and images) in the browser's application cache. To enable caching simply add the appcache package to your project. Once a user has visited a Meteor application for the first time and the application has been cached, on subsequent visits the web page loads faster because the browser can load the application out of the cache without contacting the server first. Hot code pushes ar

App.setPreference

App.setPreference(name, value, [platform]) Add a preference for your build as described in the Cordova documentation. Arguments name String A preference name supported by Cordova's config.xml. value String The value for that preference. platform String Optional. A platform name (either ios or android) to add a platform-specific preference.