FAQ Database Discussion Community
javascript,ajax,http,meteor,facebook-javascript-sdk
I'm writing a meteor method, which should return a Facebook response for HTTP.call on graph api, but HTTP.call has only a callback function to show error/response, so I can't take this data outside, and Method can not return any value. Here's my method code: loadUserFBEvents: function () { var accessToken...
meteor,iron-router
I'm facing a strange problem. I'm using Iron Router controller to pass data to template: Router.route('/wards/add/:_id?', {name: 'wards.add', controller: 'WardAddController'}); WardAddController = RouteController.extend({ action: function() { this.render('addWard', { data: function(){ return { hospitals : Hospitals.find({}), hospital_id : this.params._id } } }); } }); I return a variable 'hospitals', that should...
javascript,android,ios,meteor,mobile-application
I am developing an app for tablets (android and iOS), I am looking for some kind of settings in mobile-config that disable landscape orientation. I know how to do that on iOS by changing some settings on XCode but is their any setting that can do it for both android...
mongodb,meteor
Looking for the best way to fix data formats in my Meteor app. When I started, I wasn't using anything like SimpleSchema or being as consistent as I should have been with Date formats. So now I'd like to get everything back to proper Date objects. I'm still new-ish to...
javascript,meteor,iron-router,dynamic-url
I have a dynamic iron route with the template explicitly set, however iron router attempts to render the path instead of the template. http://localhost:3000/blog/example-post Couldn't find a template named "Blog:permalink" or "blog:permalink". Are you sure you defined it? Router.route('/blog/:permalink'), { template: 'blogPost', name: 'blogPost', path: '/blog/:permalink', data: function () {...
javascript,web-applications,meteor,filepath
In Meteor I've been looking for a way to get the home folder of the running Meteor application in Server. For example, if my .meteor folder is in C:/Users/Me/Repos/MyWebsite/.meteor, is there a way to get the path C:/Users/Me/Repos/MyWebsite/, or where ever the app is currently running at? The reason I...
javascript,meteor,iron-router
I am trying to load templates using iron router and none of the templates for the routes load. The url will change when the items are clicked but the current page never changes. Lib/router.js - Router.configure({ // we use the appBody template to define the layout for the entire app...
meteor,meteor-helper,meteor-collections
I have two collections: Contracts = new Mongo.Collection('contracts'); Reminders = new Mongo.Collection('reminders'); These are structured in the database more or less like this: Contracts: { "id": "4432234", "contract": "C-42432432", "description": "Description of contract", "counterpart": "Company name", "status": "awarded" }, etc. Reminders: { "name": "Contract expiring", "type": "expiring", "contract": "C-42432432", "reminderDate":...
javascript,mongodb,meteor
I have meteor template helper with a function that searches for a document of scores. If it can't find a matching document, it creates a new one for the user. Unfortunately, the meteor function executes the var score = UserScores.findOne(); before the publish and subscribe functions finish. Every time, a...
javascript,meteor,meteor-helper
I have a dropdownlist as filters and then there's the total posts with a limit of displaying only 4 at a time unless a load more button is clicked to show another 4 records. problem is the dropdownlist is also loading values only from that first 4 records. Here is...
meteor,mongodb-query,roles,groups
I'm trying to make an admin section on my website. The admin can go to the admin page and see a table of the users in his group. I only want to publish a the users that are in that admin's group. E.g. he is in the group ['soccer'] but...
javascript,mongodb,meteor
I am working in Meteor and trying to retrieve just the contents of one field in a Mongodb document. This particular field is an array. I've read the Mongo docs and several related questions, but my projection just isn't working. This is what I have: User adds to array using...
meteor,spacebars
So I am trying use a helper as an argument of another helper in Spacebars. In the example below, 'getResultInfo' is a helper that gets data specific to the arguments passed, and 'formatResult' is a helper that formats its result and the results of other helpers. <template name="example"> {{#each collectionResults}}...
meteor,meteor-collection2
I'm trying to create a field modifiedBy with type: Object (to Meteor users). I see you can setup blackbox: true for a Custom Object, but if I want to setup to a specific Object say a Group (collection) field modifiedBy is the logged in user, any pointers/help is greatly appreciated....
jquery,meteor,semantic-ui
I am currently trying to integrate Semantic UI into my app. The visual styling is displaying fine. However, behaviors do not appear to be working and I am not able to raise any form of exceptions in my console to help with debugging. I created a Meteor test app at...
mongodb,meteor
I am trying to find all documents and publish at most 5 from the results. Following this section of the MongoDB doc, I am trying to do this: Meteor.publish('teams', function () { return Teams.find().limit(5); }); Yet, in the server console, I get an exception: Exception from sub teams id Pm6jKL8Sv3FSDSTfM...
meteor,meteor-blaze
I'm currently rendering bootstrap modals on my webpage using MeteorJS's "renderWithData" method to load each template when it's needed. I'm running into an issue where my helper methods which access the data in the modal using "Blaze.getData()" will occasionally return undefined and I'm unsure how to fix that. The only...
javascript,facebook,mongodb,meteor,collections
I'm creating basic Administration Panel and I didn't work with MongoDB yet. For development purposes I left autopublish and insecure in the project. In order to render users from database (Accounts-ui + Accounts-facebook) i need a handler for Users = new Mongo.Collection("users"); but during compilation there is following error: '/users/insert'...
meteor,meteor-helper
I need to filter the listing or records according to selection in dropdownlists. I have three dropdowns that needs to filter the records reactively in collaboration with each other. i.e value selection in one dropdownlist should filter the records effected by other dropdownlist values. var filterAndLimitResults = function (cursor) {...
javascript,arrays,meteor,meteor-helper
I have a mongo collection to store "projects", each document stores a project with different calculations for each month of the year a_jan : 10, a_feb : 20, a_mar : 25, a_apr : 70 ... b_jan : 30, b_feb : 10, b_mar : 20, b_apr : 70 ... c_jan :...
meteor,meteor-helper
I have this Meteor layout: <template name="layout"> {{> toolbar }} <div class="container"> {{> yield}} </div> </template> Router.configure({ layoutTemplate: 'layout' }); I want to have the toolbar argument display dynamic content based on the page. I could do that by using some reactive variables. However, what happens when more than one...
javascript,http,meteor
I am playing around with some API in meteor and am trying to use the HTTP package to access it. The example they give formats the request as a Curl command like this : curl -X POST https://api.locu.com/v2/venue/search/ -d '{"fields":["name","menu_items","location","categories","description"],"menu_item_queries":[{"price":{"$ge":15},"name":"steak"}],"venue_queries":[{"location":{"locality":"San Francisco"}}],"api_key":"YOUR_API_KEY"}' How do I convert this into an HTTP.call()? Do...
meteor,iron-router
I would like to set a route option label to that of the current url, e.g. Router.route('/:_url', { label: '_url', action: function () { this.render('home'); } }); This is my helper: if (Meteor.isClient) { Template.home.helpers({ getLabel: function() { return Router.current().route.options.label; } }); } This is my template: <template name="home"> hi...
meteor,iron-router
we have the problem with the router when we navigate from one to another page. Suppose when we are in template1 and we need to go to templete2.Then we do Router.go(/templete2) right.I need in the URl templete1/templete2.Please help me....
meteor,spacebars
I am trying to pass a parameter to a template helper. The parameter seems to be passed but then I can't use it as I would like to. I pass the parameter like this: {{#if unitFieldExists 'profile'}} {{profile}} {{/}} Helper in /client/lib/helpers.js Template.registerHelper('unitFieldExists', function(unitField) { var doc = Units.findOne({_id: this._id...
javascript,mongodb,meteor
I would like to fetch only specific fields in embedded documents of my collection. One Document of my Collection: "_id" : "fDa9J245hkKnZyipM", "OrderID" : "qPypJCWov79dQ2nc2", "MWLink" : { "LinkType" : "KRF - PPUI - LOO", "LinkID" : "test3", "SiteA" : "placeA", "SiteB" : "placeB" } My helper: linkID: function() {...
meteor,iron-router
So I have a user profile and would like to have a "Favorites" section linked to it where favorited posts are displayed. My user profile URL looks like this in Iron Router: path: '/:username' And my "Favorites" URL looks like this: path: '/:username/favorites' And I'd like my user profile to...
javascript,meteor
I'm using a package that loads Font Awesome from a CDN. However, the CDN used is pretty terrible, often stalling or timing out, so I'd like to switch it out. The source code is incredibly simple, and looking through it I found this: style.href = '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'; Switching to a different...
meteor,iron-router
I have a route to display user parameters: admin/users/details/:userID In the template associated with this route I have "Back" button. What is the best way to pass "return route path" to Router.go() and access it later in Template.AdminUsersDetailsDetailsForm.events({ "click #form-back-button": function(e, t) { e.preventDefault(); Router.go(PARAM.NAME, {}); } ...
meteor,jasmine,meteor-velocity
Velocity is an amazing testing framework for Meteor and I am currently using it to test my application code. Now I added a local package to the app, but I don't know how (or if) I can test the package with Velocity, too. I would like to drop tinyTest in...
meteor,stripe-payments
I am trying to use wrapAsync for Stripe.charges call using Stripe Checkout, but I cant seem to get it working Client code Template.bookingPost2.events({ "click #accept": function(event, template){ event.preventDefault(); StripeCheckout.open({ key: 'public_key', amount: 5000, // this is equivalent to $50 name: 'Meteor Tutorial', description: 'On how to use Stripe ($50.00)', panelLabel:...
javascript,meteor,iron-router
I'm having some trouble trying to use the URL parameters in meteor with iron:router. On the home page if my app, I display a thread of posts. But I want to allow people to select a single thread by specifying its ID in the url. Like that, when someone click...
meteor,iron-router
I am looking to restrict access to a page using iron router, but the before function doesn't seem to be running. # Limit which challenges can seen to members. isMemberHook = () -> challenge = Challenges.findOne _id: @params._id if Meteor.userId() in challenge.members @next() else @redirect '/' Router.onBeforeAction isMemberHook, only: ['/challenge/:_id']...
javascript,json,mongodb,meteor
i am using keys to get the values from json in meteor. My json is in this format. { "_id" : "SXTJBs7QLXoyMFGpK", "Brand" : { "value" : "Nike" }, "Material" : { "value" : "Cooton" }, "Price" : { "value" : "67484" }, "ComboId" : { "value" : "y23" },...
javascript,mongodb,meteor,publish-subscribe,meteor-blaze
I have a list that subscribes to posts publication with a limit. Publication Meteor.publish('posts', function(options) { check(options, { sort: Object, limit: Number }); var posts = Posts.find({}, options); return posts; }); within the list, I have items under each list.html {{#each posts}} {{> postItem}} {{/each}} within each postItem, I would...
mongodb,meteor
I want to implement a simple conversation feature, where each conversation has a set of messages between two users. My question is, if I have a reference from a message to a conversation, whether I should have a reference the other way as well. Right now, each message has conversationId....
meteor
Router.route('/sms/inbound', function () { if (something) { Meteor.call("addUser", { name: "hello", age: 20 }) } }, {where: 'server'}); I want to do something like above. However, since Meteor.call is used on the client to make calls to server-side functions, it doesn't seem right to me. In collections you usually define...
meteor,iron-router
I just started using Meteor and Iron Router. Here I'm trying to use two data contexts but appearantly I'm doing it wrong. I've googled it but it doesn't seem this is a very common problem, but I guess it got to be possible to pass on two or more data...
meteor
I'm trying to re-render a collection of words in a column every time a word is submitted or deleted. It re-renders when the word is deleted but not when a word is submitted. Here's my template: <template name = "wordColumn"> {{#each words}} <button class = "label label-default" draggable="true"> {{word}} </button>...
javascript,json,meteor,data,startup
I would like to insert data at Meteor's startup. (And after from a JSON file) At startup, I create a new account and I would like to insert data and link it to this account once this one created. This is the code that creates the new account at startup:...
ubuntu,meteor,docker
I am using Meteor and Meteur Up package to push a bundle to server. It uses docker. The problem is that I cannot access graphicsmagick or imagemagick from inside a docker to use it in my app. However it is installed on the server and I can access it when...
javascript,html,css,meteor,ckeditor
I am using CKeditor, and this is my code: ...othercode.. <div class="input-field col s12"> <textarea id="textarea1" class="materialize-textarea"></textarea> <label for="textarea1">Body of the Post</label> </div> <input type="submit" name="Submit" id="sub"> </form> </div> </div> </div> {{else}} <div>You are not logged in.</div> {{/if}} <script> CKEDITOR.replace('textarea1'); </script> In Javascript, I use the same id to extract...
mongodb,meteor,coffeescript
So in my Meteor app a user can add themselves to a race or remove themselves too. See below code from my Meteor.methods: update_users_array: ( id, user ) -> if RaceList.find( _id: id, users: $elemMatch: _id: user._id ).fetch().length > 0 RaceList.update id, $pull: users: user else RaceList.update id, $push: users:...
javascript,node.js,curl,meteor
I have a line of cURL: curl -X POST --form "[email protected] Harris - Thinking About You (Tez Cadey Remix)_165299184_soundcloud.mp3" https://api.idolondemand.com/1/api/async/recognizespeech/v1 I'm building a hybrid mobile app with Meteor/Ionic as the framework. Therefore, I have access to any Node library that leverages cURL. Can anyone: 1) Suggest one of the many...
javascript,mongodb,meteor
I have a document with the following structure, some fields omitted for brevity; { _id: 1, projectName: name, managers: [ { managerId: manager1, status: false, startDate: startDate, endDate: endDate }, { managerId: manager2, status: false, startDate: startDate, endDate: endDate } { managerId: manager3, status: true, startDate: startDate, endDate: endDate }...
angularjs,meteor,angular-meteor
I'm trying to put together an app, that uses both meteor and angular I see, what appears to be two different base angular packages: one named angular:angular, and another named urigo:angular-meteor The page for angular:angular says, that that is the actual angularJS repo, in which case, assuming that means that...
meteor
I have a Method defined in lib/methods.js: Meteor.methods({ getTask: function( extraparam ) { return {dummy: 'dummy'}; } }); But when I call it from server/lib/environment.js: Meteor.call( "getTask", extraparam ); I'm getting Method not found, I was under the impression lib/ is loaded before server/lib, or should I call the method...
javascript,meteor
I would like to know how to group documents according to a condition, and publish to the client. Suppose I have the following documents: [ { name: 'John', createdAt: some_date_value_1 }, { name: 'Jane', createdAt: some_date_value_2 }, { name: 'Bob', createdAt: some_date_value_1 }, { name: 'Jenny', createdAt: some_date_value_2 } ]...
meteor
I am using following meteor package to upload the image https://github.com/CollectionFS/Meteor-CollectionFS Code I am using Uploads =new FS.Collection('uploads',{ stores: [new FS.Store.FileSystem('uploads',{path:'~/projectUploads'})] }); if (Meteor.isClient) { Template.makedobox3.events({ 'change .fileinput':function(event,template){ FS.Utility.eachFile(event,function(file){ var fileObj=new FS.File(file); Uploads.insert(fileObj,function(err){ console.log(err); }); }) } }); } I am getting error when I try to upload a file...
performance,mongodb,meteor
I am building a quora of sorts.. and I am trying to clean up my website. Currently if a user deletes their profile, their question remains there and will display no user. I am trying to link it up users. What I did was I added a field on the...
javascript,node.js,session,meteor
I am using the following code on the client side to set the Session variable: Template.download.events({ 'click button': function() { var clientid=Random.id(); UserSession.set("songsearcher", clientid); console.log(clientid + UserSession.get("songsearcher")); I am using the following pacakge: Meteor-User-session, which will explain the use of UserSession in place of Session. Now, this works fine. But...
html,meteor
I want to compare two values in a for loop, already tried using #tmpid.val ,not working. <template name="productpendingstatus"> {{#each totaltemplate}} <table class="table table-responsive table-bordered"> <thead><tr><td colspan="3">{{this.META.TEMPLATE_NAME}}</td> <td id="tmpid">{{this._id}}</td> <want to compare this value in code below> </tr></thead> </table> <div class="pendingProducts"> <table class="table table-responsive table-bordered">...
meteor
<template name="orderForm"> {{> photographyServicesForm}} {{> videographyServicesForm}} {{> onlineProductsForm}} </template> If I go to the orderForm page is there a way to get the data inside of the orderForm Blaze template instance when I'm in Chrome Console? I know how to get it inside the orderForm callbacks, events, helpers, and inside...
meteor,sass
I'd like to know how to load scss files in order when using Meteor. Not using Meteor, I would make something like application.scss and load .scss files in order so that stylesheets loaded later can depend on mixins/variables loaded earlier. And then I'd load application.scss in my template. application.scss @import...
ssl,meteor,https
I have a local meteor server running on port 3000.Then I want add the SSL Certificate to my project.I have generate the SSL files, what should I do the next?
meteor,meteor-autoform
I'd like to build an autoform in meteor that presents user with a twelve radio buttons and records an entry for each of the 12 buttons. I can get the form working easily enough if I create 12 different buttons—see below, but I'm wondering if it is possible to create...
javascript,meteor,iron-router
I have an iron-router route: Router.route('/profiel/bewerken', { subscriptions: function () { return Meteor.subscribe('currentUser'); }, action: function () { if (this.ready()) this.render('profielBewerken', { to: 'container', data: function () { return Meteor.user(); } }); else this.render('profielBewerken', { to: 'container', data: { loading: true } }); } }); It waits until the subscription...
angularjs,meteor,ionic-framework,meteor-blaze,meteoric
I used ng-click as below in ionic: <div class="list"> <a class="item item-icon-right nav-clear" href="#/app/list1" ng-click="closeMenu()"> <i class="icon ion-ios7-paper"></i> Item 1 </a> .... </div> know I want to use Meteor with Meteoric. I don't know how to convert ng-click to Blaze version. Please guide me. I didn't find anything about this...
meteor,iron-router
I am writing a meteor application with a user-role-system (alanning:roles) My Roles are group based. When a user knows my group url, it is allowed to access the group an get the role "defaultUser" in this group. localUser is allowed to subscribe to all the local stuff of a group....
database,image,mongodb,meteor,collectionfs
It is very useful to run meteor mongo and query collections from the command line, for debugging purposes, etc. Recently, I have added the collectionFS package to enable image storage in the database. However, I am unable to query the database from the command line. db.fs.collection_name.find() is not doing the...
meteor
In discover meteor, posts: function() { return Posts.find(); } is used, not this: posts: function() { return Posts.find().fetch(); } I tried function below, it also works, and can realtime update. What is cursor exactly? And What is the different of above two functions?...
meteor
I am using Template.prototype.autorun() inside a Template.prototype.onRendered() to reactively update a template. I want multiple autoruns so only the portion with updated data is run again. Here is how I imagine it would look: ... for d in [0..6] @autorun -> console.log d deplanements = [ 'deplanements' ] for h...
angularjs,meteor,angular-meteor
using angular-meteor v 0.9 trying to get a pre-packaged AngularMeteor-SmartAdmin example app to load properly Getting error: Error: [ng:btstrpd] App Already Bootstrapped with this Element 'document' Is there a way to figure out why and where this error occurs? Here is my meteor listing: angular:angular-animate 1.4.0 AngularJS (official) release. For...
meteor,meteor-velocity
I need to run tests, and have them exiting the meteor process with a certain exit code, depending on success/failure. I need to do this inside Meteor.startup. I tried process.exit(1), but only see on the console: => Exited with code: 1 => Your application is crashing. Waiting for file change....
meteor
I'm still a newbie when it comes to Meteor. The following code works, I get the list: <body> <ul> <li>Test</li> {{#each members}} {{> MembersList}} {{/each}} </ul> </body> <template name="MembersList"> <li>{{name}}</li> </template> To use iron:router in need to put this in another page with {{yield}}, so I need to put it...
mongodb,meteor,collections,insert-update
I have a meteor collection "list" that has the following data structure. "list" : [ { "_id" : "id", "author" : "authorId", "createdOn" : "DateTime", "description" : "description", "items" : [ { "item1" : { "itemComplete" : "Boolean", "itemName" : "item name", "itemDescription" : "item description", } }, { "item2"...
mongodb,meteor
I have a publication that should return me all users matching an _id array. here it the query: Meteor.users.find({ '_id': { $in: myArray}},{ 'profile.name':1, 'profile.description':1, 'profile.picture':1, 'profile.website':1, 'profile.country':1} ); When I run it in Robomongo (the mongo browser), it works. But my publication only returns undefined. when I console.log(myArray); in...
javascript,meteor
I've got this code that goes on over and over again. It inserts a new document into a Meteor Mongo collection called Services, which is a global object that is instantiated already in another file (Services = new Mongo.Collection("services")). Services.insert({ sku: 'hdrPhotos', price: 100 }); Services.insert({ sku: 'twilightPhotos', price: 100...
javascript,json,mongodb,meteor,data
I'm using my JSON file like this to insert data in my collection : var content = JSON.parse(Assets.getText('test.json')); console.log('inserting...'); Profiles.insert({ user: id, data:content }; But I would like to have a "data's tree" like that : [ user: "rtegert23423131", firstname:"test", surname:"test2", // ... ] Not like that : [ user:...
javascript,ssl,meteor,docker
Heres my mup.json: // Configure environment "env": { "PORT": 3000, "ROOT_URL": "https://www.exomatch.com" }, //SSL "ssl": { "certificate": "ssl/ssl.crt", // this is a bundle of certificates "key": "ssl/private.key", // this is the private key of the certificate "port": 443 // 443 is the default value and it's the standard HTTPS port...
testing,meteor,jasmine
I am trying to determine the best way to test my code and am running into complications from every direction I've tried. The basic code is this (though far more complex due to several layers of "triggers" that actually implement this): Client populates an object Client calls a meteor method...
meteor
i saw collaborators side-view in some (mrt, tmeasday) atmosphere organisation, is there any way to add like view in other organisations in atmosphere or is it exclusive for them ? ...
javascript,mongodb,meteor
Im trying to insert a embedded document in mongodb for a meteor project. 'submit form' : function(event){ event.preventDefault(); var query=document.getElementsByClassName("twilioProcessorsms")[0].value; ChoiceList.insert({ sms: esms, query: { accountSID: accsid, authToken: token, phoneNumber: phno} }); I am trying to have the "query" as a variable. But it considers query as a string.I dont...
meteor,meteor-accounts
New to meteor. Having problems configuring accounts-ui-bootstrap-3. {{> loginButtons}} shows OK but when clicked there is NO email address field! In server>accounts.js I have // setup accounts on meteor startup Meteor.startup(function(){ // configure accounts Accounts.config({ sendVerificationEmail: true, forbidClientAccountCreation: false }); }); I have the following packages installed: meteor-platform autopublish insecure...
meteor,meteor-helper
set METEOR_SETTINGS={"public": {"stage": "development"}} meteor Then this line: console.log(Meteor.settings.public.stage); causes this error: W20150612-20:45:38.338(-7)? (STDERR) TypeError: Cannot read property 'stage' of undefined What am I doing wrong?...
meteor,request-cancelling
I have this weird problem where some requests fails randomly. I have no idea what is causing this behavior. Sometimes it is images not loading and sometimes it is ajax request (cfs/severtime or algolia-search) and some other times everything is fine. It also happen in local and online. Here are...
javascript,meteor
I often find myself dividing my work into templates that still could use the same helpers. So, say I have this template structure: <template name="MainTemplate"> <div>{{> FirstTemplate}}</div> <div>{{> SecondTemplate}}</div> <div>{{> ThirdTemplate}}</div> <div>{{> FourthTemplate}}</div> </template> Now each of these templates wants to use the same helper, let's call it dataHelper: Template.MainTemplate.helpers({...
javascript,meteor,package,translation
I'm once again attempting to use the meteor-accounts-t9n package and I'm seriously flipping out with the vague explanations provided in the package's GitHub. I added the package with meteor add meteor-accounts-t9n as well as the accounts-password and accounts-ui packages. Then I created part of my usual project structure: client folder,...
javascript,meteor
How can I assign data context in onCreated (replace the whole context)? Following does not work: Template.mine.onCreated(function() { this.data = function() { return "MyData"; } }) While following does: Template.mine.onCreated(function() { this.data.myData = function() { return "MyData"; } }) I would like to replace the whole context. Is this possible?...
meteor,fullcalendar,semantic-ui
I am using rzymek:fullcalendar package. I just create a select list using semantic ui dropdown <div class="ui compact selection dropdown"> <i class="dropdown icon"></i> <div class="text">Compact</div> <div class="menu"> <div class="item">January 2015</div> </div> </div> Create A calendar (call the fullcalendar template):- <div class="calendar"> {{>fullcalendar options id="myCalendar"}} </div> Changing the calendar month and...
javascript,meteor
I have a very simple project with a single Meteor.publish call: Boxes = new Meteor.Collection("boxes"); if (Meteor.isServer) { Meteor.startup(function () { Boxes.remove({}) //clearing the database Boxes.insert({ //adding one element to the database boxes: [1], currentId: 1 }); }); console.log("publish1") Meteor.publish("boxes", function() { console.log("publish2") //this does not run! ever! return Boxes.find();...
meteor,meteor-autoform,meteoric
I am using autoform in my project and getting this error when I open the form Not sure if this is because of any versions or dependency, my autoform is not working and I am getting this error, I have the screenshot and the schema code, form code below, template...
javascript,jquery,meteor,loading,publish-subscribe
I have a button that calls a method. When the method is called, I would like to have the button change and show a spinner (inside the button itself). I have made the button itself and the css for it. However, I am lost in how I could hook this...
javascript,jquery,meteor
I installed type.js package and when I type this code directly in the console it works: $(function(){ $(".typedelement").typed({ strings: ["You don't have any projects yet", "Start by adding a project."], typeSpeed: 0 }); }); }); however how can I add it on my js file so it works for the...
javascript,meteor
While testing my meteor app i keep receiving emails saying my application went offline. How does i disable this feature for an specific environment or hostname ( for instance, "localhost" ) ?...
mongodb,meteor
I have this line in two .js files in Meteor: merchants = new Mongo.Collection('merchants'); It blows up with the error message below. Why? Tried adding var Removing the line in one of the files helps. What am I doing wrong? `W20150614-11:20:50.527(-7)? (STDERR) at app\signUp\signUp.js:1:48 W20150614-11:20:50.527(-7)? (STDERR) at app\signUp\signUp.js:54:3 W20150614-11:20:50.529(-7)? (STDERR)...
meteor
I have a publication on the meteor server and I would like to know how many clients are currently subscribed to that publication. The reason for this is, that I would like to show subscription count to a "publication owner". Here is a simplified code-snipped of how I try to...
angularjs,meteor,angular-meteor
just purchased Angle - Bootstrap Admin app from wrapbootstrap Tried to run the angular-meteor version of the app The first issue was that meteor did not like the contents of the default index.html, so I renamed the file to be index.ng.html Now the error I'm getting in the browser console...
meteor
I'd like to put together a mobile-friendly data acquisition app This app would be used in a data center, which means working in a disconnected mode This app also needs to carry (on the client) a mongodb collection of ASCI| character codes, to be matched with the incoming barcodes Once...
javascript,meteor,xmlhttprequest,cross-domain,cors
I have got a problem when sending a cross domain XMLHttpRequest to a Restivus API. Here my code for the client side script: var xhrurl = 'http://example.com:3000/api/test'; var xhr = createCORSRequest('POST', xhrurl); xhr.withCredentials = true; xhr.setRequestHeader("Content-type","application/json"); xhr.setRequestHeader("X-User-Id",object.apiUser); xhr.setRequestHeader("X-Auth-Token",object.apiKey); xhr.send(); Here the function createCORSRequest function createCORSRequest(method, url) { var xhr =...
javascript,meteor
I'm actually struggling with something simple; I want to my helper to be executed on the template "fullArticle". I've tried to warp the tempate into a div, but it's not correct to use name HTML attribute on div. So I tried with a class, still nothing on the console. I...
meteor,iron-router
Looking at devtools profiling, when I move between two routes with the same layoutTemplate, the layout's helpers are being rerun, and it looks like the HTML is being rerendered as well. How can I have iron router only render the yields and leave the layout alone? EDIT code: Router.map ->...
meteor,leaflet
I have created a map in Meteor using Leaflet JS. The problem is, I could only get map.panTo to work inside the Template.dynamicmap.rendered area. However, this makes it so anywhere you click on the map pans to the location. This is the complete rendered area with id and access token...
meteor
I'm using Bootstrap Select in Meteor (using this package if relevant: https://github.com/amrali/bootstrap-select-meteor), but everytime I switch page and go back (IronRouter) the select has reverted to a standard HTML select. I initialize it in the rendered callback but it's only called once and breaks when navigating: Template.temp.rendered = function() {...
mongodb,meteor,meteor-publications
I want to make a publication with several additional fields, but I don't want to either use Collection.aggregate and lose my publication updates when the collection change (so I can't just use self.added in it either). I plan to use Cursor.observeChanges in order to achieve that. I have two major...
javascript,meteor,iron-router,meteor-helper
Registering helper with current route returns error in console: Exception in template helper: TypeError: Cannot read property 'getName' of undefined And after Router is loaded - works fine. How to get rid of this console error? Helper code: if (Meteor.isClient) { // create global {{route}} helper Handlebars.registerHelper('route', function () {...
node.js,meteor
So, I'm looking to have the contents of the Categories collection of my Meteor application available at all times to the entire app. I had read somewhere that you can do this by specifying null as the first parameter (instead of a name) to the Meteor.publish function. I used the...
javascript,methods,meteor
I was looking into this presentaton, builindg large meteor applications, and i like the idea of the wrapMethod(), but it seems like i cant use it like on the example. Here is my code. Meteor.methods({ 'EX.Accounts.Methods.updateProfileData' : function(userId, firstName, secondName) { check([firstName, secondName], [String]); Meteor.users.update(userId, { $set: { 'profile.firstName': firstName,...
facebook,facebook-graph-api,meteor
Im trying to get birthday on the server side of my app. I have already the ["user_birthday"] permission on my login request. But now on the server i need to do something like this i guess. userBirtdhay = "https://graph.facebook.com/me?fields=birthday&" + user.services.facebook.id; But this results something like. https://graph.facebook.com/me?fields=birthday&10146450841965723dffsadf And if you...
javascript,twitter-bootstrap,meteor
Please could someone assist with the following: I'm trying to restrict the viewing of forms using bootstrap and Meteor. In other words, user A logs in and creates a simple (or 2, or 3...) form using a modal which then displays in the html on a panel. How do I...