Use : Template.MyNameTample.onRendered Example : Template.PaymentResult.onRendered(function() { $(window).scrollTop(0); var instance = Template.instance(); instance.autorun(function() { processando.set(true); run(); }); }); Here in this … More
Category: meteor
Meteor Js : How to show an animation of an engine running while processing?
For do this you can use the package : sacha:spin You need : meteor add sacha:spin And add in your … More
Meteor Js : How to calling synchronous methods ?
For do this you need use Future. Create : var Future = Npm.require( ‘fibers/future’ ); In your call use : … More
MeteorJs : How to use meteor Js + Neo4J database ?
Install Neo4j : $ brew install neo4j Start the Neo4j in your machine : $ neo4j start Go to console and configure … More
Meteor JS: Flow-Router – How to take the value from any param of the route ( url ) ?
Use: FlowRouter.getParam(“NAME_PARAM”) Example: Route : URL : http://localhost:3000/clientText/hjmusRA6wpL9JgBNp/list/15 CODE OF THE ROUTE: FlowRouter.route(‘/clientText/:client/list/:amount’,{ { … } }); CODE TO TAKE … More
Meteor JS: Flow-Router – Excelente way to create routes in your Meteor application
Flow-Router https://github.com/kadirahq/flow-router https://kadira.io/academy/meteor-routing-guide/content/introduction-to-flow-router https://atmospherejs.com/meteorhacks/flow-router meteor add meteorhacks:flow-router FlowRouter is a very simple router for Meteor. It is focused only on … More
Meteor JS : How to take data of an object in specific ?
For do this, you can use in html file : {{#with object}} {…} {{/with}} In your javascript file you need create … More
JavaScript + Meteor JS : How to open a link in new window ?
Use : var win = window.open(url, ‘_blank’); win.focus(); Example in a Meteor Js application: clip.file <template name=”Clip”> <div class=”card-container”> {…} … More
Meteor JS : How to make a query that finds all contained values in an array using the MongoDB ?
MongoDB operator : $in Syntax : Collection.find({attribute:{$in:array}}); Example : Meteor.publish(‘ArtistsEvent’,function(id){ var event = Events.findOne({_id:id}); if ( event.attractions ){ var att = … More
Meteor JS : The if syntax in html files
The syntax is : {{#if conditional}} {{else}} {{/if}} Example : {{#if isShowFavorite}} <a href=”#” class=”btn btn-default btn-xs pull-right favorite” role=”button” … More