meteor

Bootstrap input dropdown, change activation behavior

自作多情 提交于 2019-12-24 11:39:09
问题 I'm trying to implement a dropdown box to show search options, much the way the Stack Overflow tag search box works. The search itself is working great, but I can't get the box to show up at the right times. Here's the template: <div class="dropdown"> <input class="entryInput" id="query" name="query" type="text" data-toggle="dropdown"/> <ul class="dropdown-menu" role="menu" aria-labelledby="query"> {{#each queryResults}} <li><a class="result" data-id="{{_id}}">{{firstname}}</a></li> {{/each}}

How does `event.currentTarget.INPUT.value` give me an input value in a Meteor form submit handler?

可紊 提交于 2019-12-24 11:31:36
问题 I found example code to fetch values of text inputs from a submitted form in Meteor. I wrote my own version. Works great! Here's a snippet from my form submit event handler: 'submit form': function(event, template) { event.preventDefault(); Assets.insert({ name: event.target.inputName.value, location: event.target.inputLocation.value, value: event.target.inputValue.value }); } I'm confused about event.target.playerName. What kind of object is it? Does Meteor set up that object for us? Or is

Divide Meteor files into client and server folders

限于喜欢 提交于 2019-12-24 10:57:58
问题 I'm writing a program with meteor and I'm wondering how one would go about splitting a single meteor JavaScript file, like one that is generated upon the 'meteor' command, into a client and server folder (client.js, server.js, etc). I haven't found any good guides. Does anybody know of any? Thanks 回答1: Just create two directories, client and server . Then put the frontend codes in client and the backend codes in server . Take a look at http://docs.meteor.com/#structuringyourapp 来源: https:/

How to add a relationship or reference with AutoForm in Meteor?

拈花ヽ惹草 提交于 2019-12-24 10:39:33
问题 I use meteor-autoform to insert documents in a collection. My Items has a field groupId . How can I insert this group id when I'm submitting my item form. <template name="itemForm"> {{#autoForm type="insert" collection=Collections.Items}} {{> afQuickField name="name"}} <div class="form-group"> <button type="submit" class="btn btn-primary">Add item</button> <button type="reset" class="btn btn-default">Reset Form</button> </div> {{/autoForm}} </template> I could create another field containing

“Exited with code 8” Sample meteor applications

China☆狼群 提交于 2019-12-24 10:38:14
问题 I am new to Meteor.js and currently working on the "leaderboard" example app. After inserting a line of code: Template.leaderboard.player = function(){ return "Some other text" } I received the error in the app's interface: "Your app is crashing. Here is the latest log." Hello world /home/tomas/.meteor/packages/meteor-tool/.1.0.35.hgbesu++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/lib/node_modules/fibers/future.js:173 throw(ex); ^ ReferenceError: Template

Meteor App not able to connect to MongoDB?

匆匆过客 提交于 2019-12-24 09:37:32
问题 I am trying to run the meteor application on windows. I have local mongodb running on my machine and I have also set the environment variable <b>MONGO_URL=mongodb://127.0.0.1:27017/sample</b> on my system. Still meteor application is not able to connect to it. what could be the issue. Below is the error:- C:\workspace\node-workspace\gm>meteor [[[[[ C:\workspace\node-workspace\gm ]]]]] => `Meteor server running on: <b>http://127.0.0.1:3000/</b>` app/packages/mongo-livedata/mongo_driver.js:113

trouble with font-face in meteor based on Discover Meteor microscope app

余生长醉 提交于 2019-12-24 09:00:03
问题 I've gone through the Discover Meteor book and successfully created Microscope. Now I'm trying to build my own app based on what I've learned. I want to use @font-face for fonts and icon fonts. I can't get them to show up. Here's my directory structure: client/stylesheets I've got my fonts in the stylesheets folder. I'm using scss, by the way, and that's working fine with the scss package. Here's how I'm calling the fonts in the stylesheet: @font-face { font-family: 'AmaranthItalic'; src: url

How to suppress the auto upgrade mechanism of Meteor App

…衆ロ難τιáo~ 提交于 2019-12-24 08:46:55
问题 I want that when my Meteor App detected server changes, it will show a confirm dialog to the user whether to update or not. If the user choose "no", the App will not update itself even it is restarted. Then the user will have to press an update button on the settings page for example if he wants to update in the future. Now I know how to popup the confirm dialog (How to upgrade a meteor app), but still having no idea about suppressing the auto-update mechanism (HCP) when the App is restarted.

Why do we need to deploy a meteor app instead of just starting it?

℡╲_俬逩灬. 提交于 2019-12-24 08:37:39
问题 As we all know, we can run a meteor app by just typing meteor in a terminal. By default it will start a server and use port 3000. So why do I need to deploy it using MUP etc. I can configure it to use port 80 or use nginx to route to port 80 for the app. So the port is not the point. Edit: Assume meteor is running on a VPS or cloud server with public IP address, not a personal computer. 回答1: MUP does a few extra things you can do yourself: it 'bundles' the code into a single file, using

Iron Router hook on a route before actually changing the template

▼魔方 西西 提交于 2019-12-24 08:31:04
问题 i am trying to show the user a payment popup as soon as he clicks on a payed object. But after he pays he should directly enter the content he clicked on. Therefore i think its a good solution to solve this with the router, because i want every link on the page that redirects to this content to show this popup. My problem is i want to show the popup before redirecting the user. So i tryed the onBeforeAction hook and stuff but everything working with the iron router seems to only hook in after