meteor - Using Iron Router to waitOn subscription that's dependent on data from a doc that will come from another subscription -


I'm having trouble configuring the waitOn section of a route, where in the membership parameter One is from a different membership which comes from the price determined by a doctor.

In the game there are collection candidates and interviews. There will be one and only one candidate in one interview, here are some sample data:

  candidate = {_id: 1 firstName: 'something', last name: ' Developer '// other property}; Interview = {_id: 1, candidate ID: 1 / other property};  

The route is configured as follows.

  this.route ('conductInterview', waiting for 'path:' / interviews /: _ id / conduct ', //: _ id At: Function () {Return [Meteor.subscribe ('allUsers'), Meteor.subscribe ('Single Interview', this.params._id), // To find out the candidate ID is not known because it is stored // Interviewed Doctor subscribe to the meteor ('Single Candidate', '' '), Meteer SubSubib (' Question '), Metir Subbob (' All User '));}, Data: Function () {var Interview = Interview. _id); Returns {Interview: Interview, Candidates: Candidates.FindOn (interview.candidateId)}}}});  

The problem is that I do not have a candidate to pass the singleCandidate method in the waitOn method because it is stored in the interview doctor.

I have thought of two possible solutions, but I really do not like any of them. The first is to change the route for, such as / interviews /: _ id /: candidateId / conduct . Secondly, contempt of the data and the information of the candidate is stored in the interview doctor.

Is there any other option to accomplish this besides those two?

You can change your publishing function to single candidate, rather than the candidate's weekly e-IP, You can take it as it is and you can pass it on. Om. _id


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -