All Projects â†’ meteor-vue â†’ blaze-integration

meteor-vue / blaze-integration

Licence: other
Vue integration with Meteor's Blaze rendering engine.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to blaze-integration

awesome-blaze
🔥A curated list of awesome things related to Blaze
Stars: ✭ 29 (+20.83%)
Mutual labels:  meteor, meteor-package, blaze
Mongol Meteor Explore Minimongo Devtools
In-App MongoDB Editor for Meteor (Meteor DevTools)
Stars: ✭ 846 (+3425%)
Mutual labels:  meteor, meteor-package
Vue Meteor
🌠 Vue first-class integration in Meteor
Stars: ✭ 893 (+3620.83%)
Mutual labels:  meteor, meteor-package
Meteor Google Maps
🗺 Meteor package for the Google Maps Javascript API v3
Stars: ✭ 198 (+725%)
Mutual labels:  meteor, meteor-package
Meteor Easy Search
Easy-to-use search for Meteor with Blaze Components
Stars: ✭ 438 (+1725%)
Mutual labels:  meteor, meteor-package
Blaze
🔥 Meteor Blaze is a powerful library for creating live-updating user interfaces
Stars: ✭ 474 (+1875%)
Mutual labels:  meteor, meteor-package
Autocms
AutoCms is a simple solution for your Meteor.js app
Stars: ✭ 34 (+41.67%)
Mutual labels:  meteor, meteor-package
meteor-spacebars-tohtml
Meteor package to ease rendering spacebars to html
Stars: ✭ 35 (+45.83%)
Mutual labels:  meteor, meteor-package
Ostrio Neo4jdriver
Most advanced and efficient Neo4j REST API Driver, with support of https and GrapheneDB
Stars: ✭ 55 (+129.17%)
Mutual labels:  meteor, meteor-package
Meteor Comments Ui
Simple templates for comment functionality in your Meteor App
Stars: ✭ 78 (+225%)
Mutual labels:  meteor, meteor-package
Meteor Autoform
AutoForm is a Meteor package that adds UI components and helpers to easily create basic forms with automatic insert and update events, and automatic reactive validation.
Stars: ✭ 1,453 (+5954.17%)
Mutual labels:  meteor, blaze
Meteor Blaze Components
Reusable components for Blaze
Stars: ✭ 361 (+1404.17%)
Mutual labels:  meteor, meteor-package
spiderable-middleware
🤖 Prerendering for JavaScript powered websites. Great solution for PWAs (Progressive Web Apps), SPAs (Single Page Applications), and other websites based on top of front-end JavaScript frameworks
Stars: ✭ 29 (+20.83%)
Mutual labels:  meteor, meteor-package
Meteor Collection Helpers
⚙️ Meteor package that allows you to define helpers on your collections
Stars: ✭ 504 (+2000%)
Mutual labels:  meteor, meteor-package
Meteor Reactive Publish
Reactive publish endpoints
Stars: ✭ 123 (+412.5%)
Mutual labels:  meteor, meteor-package
Ostrio Analytics
📊 Visitor's analytics tracking code for ostr.io service
Stars: ✭ 9 (-62.5%)
Mutual labels:  meteor, meteor-package
meteor-presence
👥 Meteor package to help track users' presence
Stars: ✭ 88 (+266.67%)
Mutual labels:  meteor, meteor-package
blaze-magic-events
A new way of binding event handlers to html elements for Meteor's Blaze.
Stars: ✭ 26 (+8.33%)
Mutual labels:  meteor, blaze
Meteor Files
🚀 Upload files via DDP or HTTP to ☄️ Meteor server FS, AWS, GridFS, DropBox or Google Drive. Fast, secure and robust.
Stars: ✭ 1,033 (+4204.17%)
Mutual labels:  meteor, meteor-package
Meteor Transactions
App level transactions for Meteor + Mongo
Stars: ✭ 115 (+379.17%)
Mutual labels:  meteor, meteor-package

Vue and Blaze integration

This Meteor package provides Vue components and Blaze templates for easier integration of Vue and Blaze in the same application, with full reactivity across boundaries.

Adding this package to your Meteor application provides:

  • blaze-template Vue component, to render Blaze templates from Vue
  • VueComponent Blaze template, to render Vue components from Blaze
  • RouterLink Blaze template, to render links for Vue Router in Blaze templates

You have to use Tracker-enabled fork of Vue and fork of Tracker. See these instructions for more information.

Installation

meteor add vuejs:blaze-integration

blaze-template

From Vue, you can render Blaze templates with <blaze-template> Vue component:

<blaze-template template="myBlazeTemplate" :data="{message}"></blaze-template>

For example, Blaze template could be:

<template name="myBlazeTemplate">
  <p>Message from Vue: {{message}}</p>
</template>

This example also binds the data context to the template. So you can pass data from Vue to Blaze template.

You can bind the property to make template dynamic, bound to templateData reactive Vue property:

<blaze-template :template="templateData"></blaze-template>

You can use a different tag for the wrapper tag (default is div):

<blaze-template template="myBlazeTemplate" tag="span"></blaze-template>

Any extra arguments are passed on to wrapper tag:

<blaze-template template="myBlazeTemplate" class="foobar"></blaze-template>

If you put any content between start and end tag, it is passed to the Blaze template as Template.contentBlock:

<blaze-template template="myBlazeTemplateBlockHelper">
  <p>This is slot content from Vue: {{slotValue}}</p>
</blaze-template>

Example Blaze template:

<template name="myBlazeTemplateBlockHelper">
  <p>Blaze content.</p>
  {{> Template.contentBlock}}
</template>

It is reactive as well. slotValue comes from the Vue component, but it is rendered inside Blaze block helper template.

VueComponent

From Blaze, you can render Vue components with VueComponent Blaze template:

{{> VueComponent component="my-vue-component" props=props}}

This example also binds props to the component. So you can pass data from Blaze to Vue component. Reactively, by having props reactively change.

If you have to provide any extra arguments to the component's constructor, you can do that using args. For example, args value could be {store}, to pass Vuex store to the component.

RouterLink

If you use Vue Router in your application, you might want to change pages from Blaze. Simply using <a href="..."> will not work well because it will trigger the whole application to reload on location change. Instead, you can use RouterLink Blaze template:

{{#RouterLink to="/"}}Go to Home{{/RouterLink}}

This will render a link which will on click trigger page change through router.

The template aims to be equivalent to <router-link> Vue component. For example, you can pass as to an object which will be resolved to the target location.

It also supports adding attributes, you can add any attribue that is not known as an option for <router-link> Vue component.

{{#RouterLink to="/" class="my-class" data-my-info="{info: true}"}}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].