Meteor JS: use external script

<script> tags in body or templates aren’t executed by Meteor, they are parsed and then handled by Meteor’s templating system. You can’t expect a script tag in either of those to just work as it would with a normal HTML page. The solution is to use Template events (where you could manually append the script … Read more

How to expose a RESTful Web Service using Meteor

I did a full write-on on this in Meteorpedia: http://www.meteorpedia.com/read/REST_API The post reviews all 6 options for creating REST interfaces, from highest level (e.g. smart packages that handle everything for you) to lowest level (e.g. writing your own connectHandler). Additionally the post covers when using a REST interface is the right or wrong thing to … Read more

How do we or can we use node modules via npm with Meteor?

Meteor 1.3, released on March 28, 2016, gives apps full ES6 (ES2015) modules support and out of the box NPM support. Apps and packages can now load NPM modules directly and easily on the client and on the server. If you can use 1.3, then check http://guide.meteor.com/using-packages.html#installing-npm. For example, to use moment.js: meteor npm install … Read more

Unexpected directive ‘LoginComponent’ imported by the module ‘AppModule’. Please add a @NgModule annotation

In an NgModule.imports, you can only list modules. Not components. So the problem is here: imports:[BrowserModule, LoginComponent, SignupComponent, ResourcesComponent ] Remove the components, and take a look at the NgModules FAQ What should I import? Import modules whose public (exported) declarable classes you need to reference in this module’s component templates

How can I add third-party JavaScript libraries to a Meteor application?

You are putting jquery plugin javascript file in app folder directly,so that javascript file will be be loaded for client as well as server. As per Meteor documentation: Client loads javascript from: project/public and project/client Server loads javascript from: project/public and project/server folders. As of v1.0, Meteor is using jQuery internally in the client, so … Read more

Meteor: Proper use of Meteor.wrapAsync on server

From the Meteor.wrapAsync http://docs.meteor.com/#meteor_wrapasync you can see that you need to pass it a function and optionally a context, whereas on your two attempts you are passing the RESULT of calling the async version of Stripe.customers.create. Meteor.methods({ stripeCreateUser: function(options) { // get a sync version of our API async func var stripeCustomersCreateSync=Meteor.wrapAsync(Stripe.customers.create,Stripe.customers); // call the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)