meteor

Access parent template data with Flow Router

半腔热情 提交于 2019-12-23 22:16:13
问题 I switched to Flow Router and I have a problem. how can I access the parent template data? with Iron Router the data was coming from router and was available inside the template, so if I wanted to access a parent data Template.parentData() was working. But in Flow Router the data is not coming from router, it comes from helpers and Template.parentData() doesn't have the data in it anymore! <template name="myTemplate"> {{#if Template.subscriptionsReady}} {{> showPost parentPost }} {{> newPost

In Spacebars, how to enter data between iterations {{# each}}?

主宰稳场 提交于 2019-12-23 22:04:08
问题 I'm using Spacebars and Meteor 1.2. In {{#each post}} , how to enter data after a specific iteration. For example after the second iteration. Example: 1º iteration | 2º iteration | data | 3º iteration | 4º iteration ... 回答1: Firstly, convert your cursor to an array and add an index attribute. You're also going to need a helper to check equality (or to tell you when the conditions are right to display something different): Template.myTemplate.helpers({ post: function(){ var cursor = Posts.find

Uncaught Error: When the modifier option is true, validation object must have at least one operator

故事扮演 提交于 2019-12-23 21:28:01
问题 trying to read between StackOverflow and the documentation of meteor-simple-schema but can't find a solution. I'trying to insert data in the Meteor.users collection through a form. But keep getting an error: Uncaught Error: When the modifier option is true, validation object must have at least one operator checkModifier @ simple-schema-validation.js:271doValidation1 @ simple-schema-validation.js:321doValidation @ simple-schema-context.js:9simpleSchemaValidationContextValidate @ simple-schema

Meteor React Tutorial Step 2 did not work

主宰稳场 提交于 2019-12-23 21:18:52
问题 I am doing the Meteor React simple-todos tutorial. First step was just to create the app, cd into the app directory and run meteor. So far so good. I made the changes as given in Step 2, but the to do list does not display. I get a blank screen. Code is exactly the same as give on https://www.meteor.com/tutorials/react/components No error messages are displayed either in browser or console. Versions: Meteor 1.5.2.1, OS = Ubuntu 16.04 LTS 回答1: Try removing Blaze meteor remove blaze-html

Meteor app ran with pm2 FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

本秂侑毒 提交于 2019-12-23 20:16:36
问题 I am using meteor. I build my app with meteor build . Then I try to run it with pm2 MONGO_URL=mongodb://localhost:27017/btctestdb PORT=3000 ROOT_URL=http://myurl METEOR_SETTINGS=$(cat /home/app/settings.json) pm2 start main.js & And I get this error FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 1: node::Abort() [node /home/app/unbundled/built/p3001/1.10.0/bundle/v1.10.0atp3001.js] 2: 0x12190dc [node /home/app/unbundled/built/p3001/1.10.0/bundle/v1.10

How to run meteor application on two or more Heroku dynos?

喜你入骨 提交于 2019-12-23 20:15:46
问题 I have Meteor application which is run on Heroku platform using 1 dyno. When I increase number of dynos it stops working, reporting some problems with XHR (ERROR 404) on client side. Does anybody successfully run Meteor app on two or more Heroku dynos? If so, what should I do in order to get it working? 回答1: No, unfortunately Meteor does not work on Heroku with more than one dyno. Meteor needs session affinity, which Heroku does not currently offer. Meteor needs session affinity: Running

Meteor 1.3: can I import from the meteor shell?

≡放荡痞女 提交于 2019-12-23 19:43:19
问题 I have a file like this. const device = new Device({ host: process.env.GALIL_HOST, port parseInt(process.env.GALIL_PORT, 10) }); export default device; However, I cannot find a way to access this in the shell, other than to expose it as a global variable. Is there any way to import from the meteor shell? 回答1: It is possible to import certain symbols from the shell, depending on your Meteor version. require() - client and server, Meteor v1.3+ As of Meteor v.1.3-beta.12, it is possible to

meteor wont update data in mongodb

倾然丶 夕夏残阳落幕 提交于 2019-12-23 19:14:52
问题 I have this code: Nodes = new Meteor.Collection("nodes"); [...] Template.list.events({ 'click .toggle': function () { Session.set("selected_machine", this._id); Nodes.update(Session.get("selected_machine"), {$set: {"conf" :{"flag": true }}}); } }); I can't convince meteor to update my entry. Theres a microsecond flash in the DOM, but the server rejects to update. This is my data: { "_id" : ObjectId("50d8ec4f5919ffef343c9151"), "conf" : { "flag" : false }, "name" : "sepp" } console.log(Session

Meteor Autoform package with collection2 does not submit the form

末鹿安然 提交于 2019-12-23 18:42:28
问题 I am using using collection2 and autoform with one level nested schemas Node = new Meteor.Collection('node',{ schema: new SimpleSchema({ content: { type: String, label: "Content", max: 200 } created: { type: Date, label: "Created Date" }, modified: { type: Date, label: "Modified Date" } }) }); NodeMeta = new Meteor.Collection('Node_meta',{ schema: new SimpleSchema({ desc:{ type:String, max:200, label:"Description", optional:true } }) }); Schema = {}; Schema.nodeWithMeta= new SimpleSchema({

Instaling meteorite

霸气de小男生 提交于 2019-12-23 18:40:25
问题 I'm new, forgive me. I'm trying to install meteorite on my new Linux machine. When attempting to run the install command (with or without root access) I recive this error message: npm http GET https://registry.npmjs.org/meteorite npm ERR! Error: failed to fetch from registry: meteorite<br> npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12<br> npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)<br> npm ERR! at Request._callback (/usr/share/npm/lib