Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions examples/solomo/.meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

[email protected]
[email protected]
mrt:moment
iron:router
ionic
[email protected]
[email protected]
Expand All @@ -27,3 +25,4 @@ [email protected]
[email protected]
[email protected]
blaze-html-templates
ostrio:flow-router-extra
74 changes: 54 additions & 20 deletions examples/solomo/client/routes.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,55 @@
Router.map(function() {
this.route('map', {
path: '/',
data: function () {
Session.set("currentPhoto", null);
}
});
this.route("mapWithPhoto", {
template: "map",
path: 'map/:_id',
data: function () {
Session.set("currentPhoto", this.params._id);
}
});
this.route('camera-page');
this.route("list");
});
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import { Session } from 'meteor/session'

Router.configure({
layoutTemplate: "layout"
});
FlowRouter.route('/', {
name: 'index',
action: function () {
this.render('layout', 'map')
},
data: function () {
Session.set("currentPhoto", null);
}
})
FlowRouter.route('/map/:_id', {
name: 'mapWithPhoto',
action: function () {
this.render('layout', 'map')
},
data: function (params) {
Session.set("currentPhoto", params._id);
}
})
FlowRouter.route('/camera-page', {
name: 'camera-page',
action: function () {
this.render('layout', 'camera-page')
}
})
FlowRouter.route('/list', {
name: 'list',
action: function () {
this.render('layout', 'list')
}
})

// Router.map(function() {
// this.route('map', {
// path: '/',
// data: function () {
// Session.set("currentPhoto", null);
// }
// });
// this.route("mapWithPhoto", {
// template: "map",
// path: 'map/:_id',
// data: function () {
// Session.set("currentPhoto", this.params._id);
// }
// });
// this.route('camera-page');
// this.route("list");
// });
//
// Router.configure({
// layoutTemplate: "layout"
// });
Copy link
Member

@nachocodoner nachocodoner May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to keep these comments?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to keep it commented for at least one more iteration just in case I have missed something in the migration to flow-router.

6 changes: 3 additions & 3 deletions examples/solomo/devshop-demo.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Meteor } from 'meteor/meteor';
import { Session } from 'meteor/session';
import { MeteorCamera } from 'meteor/mdg:camera';
import { Router } from 'meteor/iron:router';
import { Reload } from 'meteor/reload';
import { Geolocation } from 'meteor/mdg:geolocation';
import { Tracker } from 'meteor/tracker';
import { ReactiveVar } from "meteor/reactive-var";
import { Template } from "meteor/templating";
import { Mongo } from "meteor/mongo";
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';

const Photos = new Mongo.Collection("photos");

Expand Down Expand Up @@ -46,7 +46,7 @@ if (Meteor.isClient) {
}
});

Router.go("/list");
FlowRouter.go("/list");
};

Template.layout.events({
Expand All @@ -62,7 +62,7 @@ if (Meteor.isClient) {

Template.layout.helpers({
onPage: function (pageName) {
return Router.current().route.name === pageName;
return FlowRouter.current().route.name === pageName;
}
});

Expand Down
Loading