meteor

Can't get jQuery-ui autocomplete to work in Meteor

懵懂的女人 提交于 2020-01-04 03:00:33
问题 I see that others are successfully using jQuery-ui within Meteor, but my first attempts to play with autocomplete have failed. Here's what I've tried: I put the downloaded jquery-ui files in my client directory (I didn't keep the jQuery files as jquery is already available). This fails because jQuery looks for the css files using a relative path, and Meteor doesn't serve them that way - it flattens the paths, and when the original path is requested, it returns the main page of the app; Chrome

Easiest way to create mobile apps on official Meteor for Windows

坚强是说给别人听的谎言 提交于 2020-01-04 02:57:32
问题 I want to develop a Meteor app that will be deployed for web and mobile app (Android & iOS). I will use Windows on my dev machine. I will use WebStorm as my IDE. What are the easiest ways to get my app deployed into the app stores? I want to minimise extra configuration effort and duplicate code. === Supporting info === Some possible solutions I've come across are: nitrous.io - but costs money Vagrant - but looks complicated When I run >meteor install-sdk android I get This command is not yet

How to get past the MongoDB port error to launch the examples?

限于喜欢 提交于 2020-01-04 02:04:22
问题 I'm getting started with Meteor, using the examples: https://www.meteor.com/examples/parties If I deploy and load the deployment url ( http://radically-finished-parties-app.meteor.com/ ) , the app runs ... nothing magic there... it was an easy example My issue occurs when I want to run it locally, I get the following message "You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number" I got meteor running through the terminal command:

How to transparently turn a native JavaScript variable into a reactive Meteor variable?

こ雲淡風輕ζ 提交于 2020-01-04 01:25:15
问题 Tracker computations are not re-run when a native variable change: var foo = 'foo'; Tracker.autorun(function logFoo() { console.log('foo is:', foo); }); This code will be executed only one time: foo is: 'foo' The computation has no dependency, no _onInvalidateCallback . It's pretty much dead. There is however a lot of cases where I do need a native JavaScript variable or an object field to somehow run reactively inside Tracker computations (native API not fully ported to Meteor, ...) Of

Meteor async code to update a view

橙三吉。 提交于 2020-01-03 20:04:12
问题 So what I am trying to do is make an HTTP get request and then update a view with the response. For some reason it's not working. Here is what I have. I have been following this gist: https://gist.github.com/3443021 On the client: Template.search.items = function() { var query = Session.get("query"); console.log(query); var resp; Meteor.call("search", query, function(err, res) { console.log(res); //return res; return [1,2,4]; }); }; On the server: Meteor.methods({ search: function(query) {

A good way to define default rendering templates in FlowRouter

廉价感情. 提交于 2020-01-03 18:58:57
问题 When migrating to a new Meteor project which was replacing Iron-Router with Flow-Router, I really missed the functionality of Iron-Router to define default behaviours and settings that were usable globally. I understand Flow-Router uses the "group" construct to be able to define default hook events which can be applied to any route attached to that group, but there seemed to be nothing available for defining default templates. What is the best way to implement this type of default global or

How do I indicate 'checked' or 'selected' state for input controls in Meteor (with spacebars templates)?

半腔热情 提交于 2020-01-03 18:48:28
问题 So I'm trying to be efficient and clean in my Spacebars templates as I work with Meteor. But I'm stumped by the way in which checkboxes and select options are to be dealt with. Suppose I want to have a checkbox set as checked or not depending on a flag that is in a document in one of my collections. I don't appear to be able to do the following: <input type='checkbox' id='item-{{this.item_id}}' {{#if checked}}checked{{/if}} /> When I try this, I get the following error: A template tag of type

How do I indicate 'checked' or 'selected' state for input controls in Meteor (with spacebars templates)?

淺唱寂寞╮ 提交于 2020-01-03 18:46:11
问题 So I'm trying to be efficient and clean in my Spacebars templates as I work with Meteor. But I'm stumped by the way in which checkboxes and select options are to be dealt with. Suppose I want to have a checkbox set as checked or not depending on a flag that is in a document in one of my collections. I don't appear to be able to do the following: <input type='checkbox' id='item-{{this.item_id}}' {{#if checked}}checked{{/if}} /> When I try this, I get the following error: A template tag of type

Optimal way to save order of jQueryUI sortable list with Meteor

为君一笑 提交于 2020-01-03 17:28:49
问题 I need some guidance/suggestions for an optimal way to save the order of a sortable list that takes advantage of Meteor. The following is a scaled down version of what I'm trying to do. The application is a simple todo list. The end goal for the user is to sort their list where the data is picked up from the database. As the user sorts tasks, I would like to save the order of the tasks. I've implemented this application without Meteor using php/ajax calls using sortable's update event that

handlebars: how to access an array?

只愿长相守 提交于 2020-01-03 15:33:25
问题 I have the following simplified document: { channel:'Channelname', users: [ {userId:1}, {userId:2}, {userId:3} ] } How can i access the userId's in a {{#each}} loop like so: {{#each channels}} {{channel}} {{#each channels.users}} {{userId}} //or {{channels.users.userId}} ? {{/each}} {{/each}} The first {{#each}} loop prints my channelname as expected, but the second {{#each}} loop doesn't print anything. Regards, Cid 回答1: Use {{#each channels}} {{channel}} {{#each users}} {{userId}} {{/each}}