iron-router

reywood/meteor-iron-router-ga not working with mobile app cordova for Google Analytics

空扰寡人 提交于 2019-12-05 07:52:56
问题 I am using reywood/meteor-iron-router-ga package for my Google analytics but i do not know why events or Real time events are not logged from mobile app. I did simple configurations for this but not worked. I also used Google Analytics debugger to detect the problem but it looks fine Link Analytics and Search Console -> RESOLVED Bad Default URL -> RESOLVED This is the output of any event click on my app. I also try to replace reywood/meteor-iron-router-ga with simple JavaScript Analytics.js

Meteor account email verify fails two ways

情到浓时终转凉″ 提交于 2019-12-05 06:50:22
I have email hooked up on my dev box, and get a verification email after creating a user. I can click on the included link, and it will bring me to my main page. 1) Clicking on the link seems to do some processing, because it redirects to /, but it does not change the verified flag on the user account. 2) It seems to ignore my Accounts.config setting, and only works when I explicitly call token = Accounts.sendVerificationEmail(userId) Details: mrt --version Meteorite version 0.6.11 Release 0.6.5.1 mrt list --using standard-app-packages preserve-inputs less coffeescript iron-router foundation

Uncaught Error: No Iron.Layout found so you can't use yield

故事扮演 提交于 2019-12-05 06:03:11
Using Meteor 0.9.3 and iron:router 1.0.0-pre2, this error shows on the console even though iron:layout was installed, see below: willems-mini:iron willem$ meteor add iron:router@=1.0.0-pre2 added iron:location at version 1.0.0-pre2 added iron:dynamic-template at version 1.0.0-pre2 added iron:router at version 1.0.0-pre2 added iron:layout at version 1.0.0-pre2 added iron:middleware-stack at version 1.0.0-pre2 added iron:url at version 1.0.0-pre2 added iron:controller at version 1.0.0-pre2 added iron:core at version 1.0.0-pre2 iron:router: Routing specifically designed for Meteor There are no

Meteor.user() returns undefined after page reload

做~自己de王妃 提交于 2019-12-05 05:14:51
Thing is I want to check if the user is is logged in via Meteor.user() within onBeforeAction in my routes. Problem is, after a page reload Meteor.user() returns undefined for a split second before it gets loaded. Here my route config: Router.map(function() { this.route('list', { path: '/list', template: 'list', onBeforeAction: function(){ console.log('onBeforeAction'); if(!Meteor.user()){ Router.go('/login'); } this.next(); } }); }); I googled a lot and the workarounds with "waitOn" and "return Meteor.user();" doesn't seem to work in my case. Also interesting...locally it works perfectly fine,

Previous page location on IronRouter

半城伤御伤魂 提交于 2019-12-05 00:02:23
问题 Is there a way to get the previous page location before going to the next page in IronRouter? Is there an event I can use to fetch this information? Thanks in advance. 回答1: You can achieve the behavior you want by using hooks. // onStop hook is executed whenever we LEAVE a route Router.onStop(function(){ // register the previous route location in a session variable Session.set("previousLocationPath",this.location.path); }); // onBeforeAction is executed before actually going to a new route

Meteor Iron Router with custom waitOn

六月ゝ 毕业季﹏ 提交于 2019-12-04 19:49:30
I was wondering whether anyone has built their own waitOn function? I am not using subscribe to drive the waitOn but rather I want to wait on a helper to trigger the ready state, something like this: this.route('edit_Record', { path: '/record/edit/:_id', waitOn: function() { return XXXXX; } }); Template.edit_Record.helpers({ selectedRecord: function () { wait(3000); var x = myRecords.findOne({_id: this.editid}); //XXXXX This is where I want to set 'ready' return x; } }); I've designed my own pattern to work with a custom waitOn. You should be aware that IronRouter won't render your template

MeteorJS + Iron-Router: How can I call the next item in the collection using pathFor?

那年仲夏 提交于 2019-12-04 15:53:44
问题 I did a lot of research before posting this question and couldn't find the answer. I'm sure it's a simple task, but it's going over my head for some reason. I have a "posts" type page that lists all items in my collection, and a "single post" page to display the contents of the selected post. I have two pagination arrows for going to the previous item and next item. How can I grab the URL for the previous/next posts and display it in my template? Any help would be appreciated, thanks! 回答1: I

understand new mongo id and use it with iron-router

前提是你 提交于 2019-12-04 15:01:35
问题 i have a simple post route that looks for the post _id . The problem is that the pathFor helper creates a path like this: ObjectID("52e16453431fc2fba4b6d6a8") I guess the mongoDB insertion as been changed and now the _id object holds another object inside it called _str . Here is my route: this.route("post", { path: "/post/:_id", waitOn:function(){ NProgress.start(); Meteor.subscribe("Teams"); }, before: function () { NProgress.done(); }, data: function () { return Posts.findOne({_id: this

meteor iron-router and getting the names of all routes for the accounts-entry package

安稳与你 提交于 2019-12-04 13:41:01
The popular accounts-entry package has an iron-router related bug in it. I believe the later versions of iron-router changed to work better as middleware and so a call to Router.routes At line 87 of this file the following code is used: _.each Router.routes, (route)-> exclusions.push route.name # Change the fromWhere session variable when you leave a path Router.onStop -> # If the route is an entry route, no need to save it if (!_.contains(exclusions, Router.current().route?.getName())) Session.set('fromWhere', Router.current().path) Unfortunately it does not seems like doing an _.each on

Page transitions in meteor?

戏子无情 提交于 2019-12-04 13:24:05
问题 I've got a meteor mobile app structurally working; I really need to stitch the views together with some page transitions. I looked at the iron-transitioner project but it looks like development has ceased? (last commit 6 months ago, still using Spark engine) I've also looked at a few UI 'mobile frameworks' (Ratchet, Framework7) but I couldn't get them to play nicely with the meteor server. I'm wondering if anyone knows of any other simple (left/right) page transition package / script that I