meteor

Meteor: Accounts.createUser() doesn't create user

好久不见. 提交于 2020-01-03 03:14:06
问题 i'm building an application where people Can't create their account by themselves but the first user created (me) can create users in a form in the application. It's why I setted in /lib/config/account.js: forbidClientAccountCreation: true, My problem is, I can't create users in my form when I'm logged .. (even if I set this option above with false. Here is my code: userAdd.js: Template.userAdd.events({ 'submit .new-user': function(event) { event.preventDefault(); var email = $('input[name=

Change Meteor email validation link and route

跟風遠走 提交于 2020-01-03 03:04:25
问题 When Meteor sends the email with the link to validate the account, the link looks like this: "//localhost:3000/#/verify-email/jOCevGxWbWQfcGL7KAtQ" If you click on the link it validates the account as a charm, but it sends the user to the 'ROOT' template. I want to change this route. Clicking on the validation link have to route the user to another page, another then root route ('/'). I have tryied changing the link adding a new template: "//localhost:3000/template/#/verify-email

Why does my Meteor.method return undefined? [duplicate]

纵然是瞬间 提交于 2020-01-03 02:37:33
问题 This question already has answers here : How do I return the response from an asynchronous call? (36 answers) Closed 3 years ago . There is a simple field to input a youtube ID. I am using renaldo's youtube api (https://atmospherejs.com/renaldo/youtube-api) to retrieve the title of the youtube clip. The client side event passes the track ID (var tid) value to the method 'addTrack' successfully - it outputs the track's title to the console on the server. I am having a really bad time returning

How to truncate string using meteor and handlebars?

一世执手 提交于 2020-01-03 02:02:05
问题 In jinja2(python) template engine there is a simple thing for truncating strings: {{ fooText|truncate(200) }} Does meteor(handlebars) provides something like this? 回答1: I never use | on spacebars (the engine used on meteor template), but you can do a helper to accomplish this(for example a global Template.registerHelperr). Template.registerHelper('text', function(passedString) { var fooText = passedString.substring(0,1); //same as truncate. return new Spacebars.SafeString(fooText) }); And use

Difference between Template.instance() and this

最后都变了- 提交于 2020-01-02 18:35:23
问题 What is the difference between Template.instance() and this? Is there an advantage to use one or the other? Template.name.onRendered( function() { var template = Template.instance(); var instance = this; }); 回答1: When inside a lifecycle event such as onCreated , onRendered or onDestroyed , Template.instance() will return the same object as this because in these callback registration functions, this is explicitly set to the current template instance by Meteor. HTML <template name="component">

Angular UI-Calendar TypeError: calendar.fullCalendar is not a function

依然范特西╮ 提交于 2020-01-02 18:16:33
问题 I been trying to use Angular: ui-calendar with meteor, but get this error. TypeError: calendar.fullCalendar is not a function at Scope.scope.initCalendar (calendar.js:265) at Object.fn (calendar.js:337) at Scope.$digest (angular.js:15896) at Scope.$apply (angular.js:16160) at bootstrapApply (angular.js:1679) at Object.invoke (angular.js:4523) at doBootstrap (angular.js:1677) at Object.bootstrap (angular.js:1697) at HTMLDocument.onReady (app.js:47) at fire (jquery.js:3143) In meteor packages i

How do I prevent window focus change when Meteor reactive template update from data subscription changes?

梦想与她 提交于 2020-01-02 17:18:18
问题 I have a long page. It contains references to templates, some of which render data. One of the templates on the page is subscribed to a collection. When the collection changes the view in that template renders those items that have been added or changed. It does so quite nicely and doesn't reload the page. The problem is that the focus of the page jumps to that template when data renders. The data the template renders is being updated by other users and the server. So, the user might not be

Meteor accounts-password + accounts-entry and Password Confirmation

ぃ、小莉子 提交于 2020-01-02 12:24:31
问题 I don't see any options in the accounts-entry package, nor the accounts-password package, that allows for a password-confirmation field in the signup form in accounts-entry. Am I missing something? 回答1: No it dosnt have a verify password field on the package, you need to create by your own with simple JS if(password === validationPassword){ Meteor.call("createUsers",mail,password,profile); } This type of action can only be completed in the client side and not on the server side, because the

Can I hot deploy Meteor client HTML files?

有些话、适合烂在心里 提交于 2020-01-02 09:43:23
问题 Meteor is pretty amazing in that you can update the HTML files manually while developing locally and those changes take affect immediately when you save the file. I would like to take that same functionality and bring it to our deployed environment. The reason being that we would like to allow our client to make changes to the UI without having to redeploy the application or even know it's a Meteor app. They might add new fields to a list view, new fields to a form, change labels, etc. Thus

Getting Meteor private folder path in Meteor Deploy Environment

旧巷老猫 提交于 2020-01-02 09:41:08
问题 I need to get the path of the file inside the private folder. On my local machine I was able to get it by using the path "../../../../../" , however, when I deployed to meteor server using meteor deploy , it doesn't work anymore. Also I tried to log the current directory using process.cwd() and got the following, which is different from the structure I got on my local machine: /meteor/containers/3906c248-566e-61b7-4637-6fb724a33c16/bundle/programs/server The directory logged from my local