meteor

Meteor Files findOne return undefined

扶醉桌前 提交于 2020-01-06 08:04:11
问题 i use Meteor Files for uploading files. i managed to save it to database and filesystem but i failed to get those files from its findOne method. here is my product collection : import { Mongo } from 'meteor/mongo'; import { Meteor } from 'meteor/meteor'; import Images from './imagesCollection'; const ProductCollection = new Mongo.Collection( 'products' ); ProductCollection.helpers({ photos() { return Images.findOne({ meta: { productId: this._id } }); } }); and here is my image collection:

Meteor Files findOne return undefined

空扰寡人 提交于 2020-01-06 08:03:18
问题 i use Meteor Files for uploading files. i managed to save it to database and filesystem but i failed to get those files from its findOne method. here is my product collection : import { Mongo } from 'meteor/mongo'; import { Meteor } from 'meteor/meteor'; import Images from './imagesCollection'; const ProductCollection = new Mongo.Collection( 'products' ); ProductCollection.helpers({ photos() { return Images.findOne({ meta: { productId: this._id } }); } }); and here is my image collection:

How can I get Meteor (client) unit tests (using Velocity with Jasmine) to work in Cordova on device?

旧巷老猫 提交于 2020-01-06 07:39:21
问题 I have a mobile Meteor project (Cordova + Ionic Framework + Angular-Meteor) with unit-tests set up with Velocity and Jasmine. When testing in the browser, the client tests execute as expected but fail on mobile devices. The test servers are hosted at localhost so the devices can't find my computer which hosts the app and test servers. How can I change the Velocity test servers host from localhost to my LAN IP address? 回答1: You need to set your ROOT_URL environment variable. I found that if my

Form inside Boostrap Modal does not reset

心不动则不痛 提交于 2020-01-06 06:30:19
问题 I am using below click event to reset Form. 'click .resetBulkAssignForm' : function(events, template){ console.log('Reset', $(".bulkAssignForm")[0]); $(".bulkAssignForm")[0].reset(); $(".bulkAssignForm").find("select").val(""); $('#firmName').select2('data', null); }, I also tried most of the answers available on SO to solve this issue. Question: How to reset form inside Bootstrap Modal? Below is the image of the modal with console output. NOTE: I am using AdminLTE 2.3.11, Select2. Also

Form inside Boostrap Modal does not reset

北城以北 提交于 2020-01-06 06:29:31
问题 I am using below click event to reset Form. 'click .resetBulkAssignForm' : function(events, template){ console.log('Reset', $(".bulkAssignForm")[0]); $(".bulkAssignForm")[0].reset(); $(".bulkAssignForm").find("select").val(""); $('#firmName').select2('data', null); }, I also tried most of the answers available on SO to solve this issue. Question: How to reset form inside Bootstrap Modal? Below is the image of the modal with console output. NOTE: I am using AdminLTE 2.3.11, Select2. Also

meteor create project failing

前提是你 提交于 2020-01-06 04:35:08
问题 os: window 10 when I create meteor project, it shows following error. So I can not learn Meteor. C:\test>meteor create asd C:\Users\msm08\AppData\Local\.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:218 throw error; ^ Error: Error: Could not install npm dependencies for test-packages: Command failed: C:\WINDOWS\system32\cmd.exe /c C:\Users\msm08\AppData\Local\.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev

Can you run a meteor bundle, example.tar.z , on a computer that doesn't have meteor?

你说的曾经没有我的故事 提交于 2020-01-06 04:10:07
问题 If I bundle a meteor app using meteor bundle iron.tar.gz can I run the app locally, (localhost:3000), on a different computer that does not have meteor installed. If so, how would I go about doing it? Thanks for the help! 回答1: Meteor pieces will be bundled in your meteor bundle, but you're going to need to have Node.js and NPM installed on that other box. I use Forever so that it stays up and running and have two scripts. This one takes the bundle name as an argument and installs the bundle

Jquery (metis-menu) not working with iron:router in meteor

自古美人都是妖i 提交于 2020-01-06 03:28:27
问题 I'm trying to implement a sidebar (leveraging the sidebar from sb-admin-2When I use the side bar as part of main.html, the toggles work perfectly fine. However, when I implement the same via iron:router and set the sidebar to be persistent, the sidebar loses the toggle/hide functionality. basically, the child level elements are always expanded and I have no means to hide those child level elements. Is there a work around to this? I've the side bar code here in pastie --> This works when in

Create join of two collections in MongoDB using Meteor JS

我是研究僧i 提交于 2020-01-06 03:24:07
问题 I have following data structure: Collection books: { _id: "ajafsoaifj3341", title: "Hello World", poems: [ { id: "12fjenofnoi23", addedAt: "2018-03-12...." }, { id: "563jdfb34jfrr", addedAt: "2018-03-10...." }, { id: "78a1ewqeqweq", addedAt: "2018-03-08...." } ] } Collection poems: { _id: "563jdfb34jfrr", title: "How to Join", author: "Smith" addedAt: "2017-12-21..." } I need to join these two collections to get the title of the poem. Something like: { _id: "ajafsoaifj3341", title: "Hello

Missing packages folder and smart.json file in Meteor.js 0.9

旧时模样 提交于 2020-01-06 03:05:41
问题 It may be a dumb question but I upgraded meteor.js to meteor 0.9 and now, when I add packages, I do not see /packages folder or smart.json file in the root of my project. How can I reach to the source code of the downloaded packages. Thank you. 回答1: The source code of the downloaded packages is in a semi compiled state, nothing like what you would find on github. To access these have a look at ~/.meteor/packages . You would find them with the new notation e.g for iron:router you would see