Meteor Railway Transfer ArrayList value as parameters

I am new to meteor and have been trying to pass a value from an arraylist to an href pathfor element.

I have a template

The data sent to the template using the helper is basically an array of strings from the following helper

'data': function( ){
var distinctOrgListing = _.uniq(MyCustomCollection.find({}, {sort: {orgName: 1}, fields: {orgName: true}}).fetch().map(function(x) { return x.orgName;}), true);
console.log("Listing.helpers: distinct listings :" +distinctOrgListing)
return distinctOrgListing;
}

This will return some data in the form of a list of strings. For example, when printing to the console, I will get

Listing.helpers: distinct listings: a,b,c< /pre> 

I want

>Send the value I received as a parameter to Iron Router so that I can use the value for collection search

My router configuration As follows:

this.route("listingbycompanyL1",{
path:"/listingL1",
layoutTemplate: ' ListingbycompanyL1',
data: function(){
var update=MyCustomCollection.find({orgName:"XXXX" }).fetch();
return {
update:update
};
}
});

How to pass the value I received (a,b,c) to IR and use it to search, where XXXX Is a or b or c

This is a simple parameterized route:

this.route("listingbycompanyL1",{
// specify the strategy _id as an URL component instead of query parameter
path:"/listingL1/: a",
layoutTemplate:'ListingbycompanyL1',
data: function(){
var update=MyCustomCollection.find({orgName: this.params.a }).fetch();< br /> return {
update:update
};
}
});

I am a newbie to meteor And have been trying to pass a value from an arraylist to an href pathfor element.

I have a template

The data sent to the template using the helper is basically an array of strings from the following helper

'data': function(){
var distinctOrgListing = _.uniq(MyCustomCollection.find({}, {sort: {orgName: 1}, fields: {orgName: true}}).fetch().map(function(x) {return x.orgName;}), true);
console.log("Listing.helpers: distinct listings :" +distinctOrgListing)
return distinctOrgListing;
}

This will return some data in the form of a list of strings. For example, when printing to the console, I will get

Listing.helpers: distinct listings: a,b,c

I want

>Send the value I received as a parameter to Iron Router so that I can use The value is set to search

My router configuration is as follows:

this.route("listingbycompanyL1",{
path:"/listingL1 ",
layoutTemplate:'ListingbycompanyL1',
data: function(){
var update=MyCustomCollection.find({orgName:"XXXX" }).fetch();
return {
update:update
};
}
});

How to pass the value (a,b,c) I received to IR and use it to search, where XXXX is a or b or c

This is a simple parameterized route:

< p>

this.route("l istingbycompanyL1",{
// specify the strategy _id as an URL component instead of query parameter
path:"/listingL1/:a",
layoutTemplate:'ListingbycompanyL1',
data: function(){
var update=MyCustomCollection.find({orgName: this.params.a }).fetch();
return {
update:update
} ;
}
});

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 1359 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.