-
Notifications
You must be signed in to change notification settings - Fork 0
/
router.js
54 lines (52 loc) · 1.22 KB
/
router.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Router.configure({
layoutTemplate: 'ApplicationLayout'
});
Router.route('/' , {
name: 'mainPageListing'
});
Router.route('/add' , {
name: 'formTemplate'
});
Router.route('/contact' , {
name: 'Contact'
});
Router.route('/list/:_id' , {
name: 'test',
data: function () {
console.log("hellodfhdshgfgh jfjghf fghgh hh ")
return FormData.findOne({_id: this.params._id});
}
});
// Router.route('/answerForm/:_id' , {
// name: 'test',
// });
Router.route('/list/:_id/answerForm' , {
name: 'answerForm',
data: function () {
console.log("Id:",this.params._id)
return {
id:this.params._id
}
}
});
Router.route('/list/:_id/edit' , {
name: 'updateQuesForm',
data: function () {
console.log("hello my name is aman")
return FormData.findOne({_id: this.params._id});
}
});
Router.route('/list/:_id/edit-answer' , {
name: 'updateAnsForm',
data: function () {
console.log("hello my name is aman")
return AnswerData.findOne({_id: this.params._id});
}
});
// Router.route('/list/:_id/edit' , {
// name: 'updateAnsForm',
// data: function () {
// console.log("hello my name is aman")
// return FormData.findOne({_id: this.params._id});
// }
// });