meteor

Router waitOn waits on subscription on every render

▼魔方 西西 提交于 2019-12-21 02:03:52
问题 I have a route with a waitOn hook that returns a Meteor.subscribe . Every time the route is triggered, I see the spinner from my loadingTemplate briefly before seeing the actual data. I would have thought that I only had to wait on the subscription to be downloaded once, namely the first time? If I'm doing it wrong, please suggest a better way. 回答1: Have a look at the last comments on this issue. Chris explains that the subscriptions initiated by your router will be stopped once you navigate

Meteor RESTful Authentication. Is it possible?

北慕城南 提交于 2019-12-21 01:18:50
问题 I have searched around but cant find an a satisfactory answer to this question. I have a meteor website where users login and create content. I also want to create a phone app, that is capable of interacting with the website, and I want the users to log into the phone app and access the same content on the website. Pretty normal. I have created a basic REST API for accessing the collections using the meteorite package HTTP.publish . It is working without any user info (no auth), but now I

Bootstrap modal doesn't appear in Meteor

五迷三道 提交于 2019-12-21 01:07:20
问题 I'm trying to get Bootsrap's modal to work but when I click on the button all I get is a black screen, no modal dialog box appears as I expect it to. I'm using meteor. Here's the code I have: <div class="container"> <h2>Example of creating Modals with Twitter Bootstrap</h2> <div class="modal hide fade in" id="example" style="display: none; "> <div class="modal-header"> <a class="close" data-dismiss="modal">×</a> <h3>This is a Modal Heading</h3> </div> <div class="modal-body"> <h4>Text in a

How to add a cordova plugin to meteor that isn't in the phonegap registry?

戏子无情 提交于 2019-12-20 23:30:06
问题 According to the documentation you can add a project from the registry or from a tarball url? # add plugin from plugin registry meteor add cordova:org.apache.cordova.camera@0.3.1 # add plugin from the tarball url meteor add cordova:com.phonegap.plugins.facebookconnect@https://github.com/Wizcorp/phonegap-facebook-plugin/tarball/0e61babb65bc1716b957b6294c7fdef3ce6ace79 So how do I add this plugin off of github? 回答1: meteor add cordova:com.verso.cordova.clipboard@https://github.com

MeteorJS: Login buttons without a dropdown

人走茶凉 提交于 2019-12-20 19:39:17
问题 I know that you can use {{> loginButtons}} to get a dropdown with login options. I would like to have the login buttons on my page directly without a dropdown since I would like the UI to be clean on mobile. Is there any way to break the accounts ui out of the dropdown and put it in a div on the main page? 回答1: I asked the same question in #meteor and someone sent me this example on customizing the accounts-ui login. It is clear and straightforward. I used this as a guide to customize the

Meteor Iron Router : Passing data between routes

杀马特。学长 韩版系。学妹 提交于 2019-12-20 18:46:31
问题 How do I pass data between two different routes and templates? I have a javascript file on the front end (client folder) that simply calls Router.go() passing in the post ID as one of my parameters. Below are the three main culprits (I believe). I've removed most of the code to make it easier to read. I can change to the PostDetail page with no problems. I can also retrieve the PostId on the PostDetail page from the Router. My problem is, the database entry ( POLL ) that is retrieved does not

Scroll event for Meteor

我只是一个虾纸丫 提交于 2019-12-20 18:41:59
问题 I couldn't find a scroll event for meteor in the meteor docs. How do I go about doing something as someone scrolls the window down in a meteor application? I've tried 'scroll window' : function(event) { ... } which doesn't work as expected. 回答1: I've been messing around with this as well. I haven't found a way to do it cleanly within Template.template.events . The obvious temporary solution right now would be using a simple jQuery scroll event. $(window).scroll(function(){//your code});

Running meteor in a cluster and real-time changes

ぃ、小莉子 提交于 2019-12-20 18:33:04
问题 I was planning on deploying Meteor to my Amazon AWS EC2 servers but I would like to also run multiple instances of the server at the same time to serve more clients. Is there a proper way to do this in Meteor without breaking the ability for clients to updated about updates to their collections? 回答1: There are two main issues to consider when running multiple Meteor server processes. Client session affinity. Clients use the SockJS library to connect back to the Meteor server, usually by using

Running meteor in a cluster and real-time changes

ε祈祈猫儿з 提交于 2019-12-20 18:30:52
问题 I was planning on deploying Meteor to my Amazon AWS EC2 servers but I would like to also run multiple instances of the server at the same time to serve more clients. Is there a proper way to do this in Meteor without breaking the ability for clients to updated about updates to their collections? 回答1: There are two main issues to consider when running multiple Meteor server processes. Client session affinity. Clients use the SockJS library to connect back to the Meteor server, usually by using

MongoDB bind_ip error: bind() failed errno:99 Cannot assign requested address for socket

醉酒当歌 提交于 2019-12-20 17:35:31
问题 I want to configure mongodb to allow remote connections from an external ip address like 66.31.123.123 . Setting 0.0.0.0 to bind_ip works, but I want to be more restrictive and only allow certain ip addresses to connect. I appended 66.31.123.123 to the bind_ip list but mongodb throws an error below: mongodb.conf bind_ip = 127.0.0.1,66.31.123.123 port = 27017 auth = true mongodb logs Mon Dec 9 03:25:59 [initandlisten] ERROR: listen(): bind() failed errno:99 Cannot assign requested address for