This repository was archived by the owner on Jan 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrouting.coffee
More file actions
67 lines (55 loc) · 1.28 KB
/
routing.coffee
File metadata and controls
67 lines (55 loc) · 1.28 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
Router.configure
layoutTemplate : 'layout'
notFoundTemplate : 'notFound'
# if Meteor.isClient
# IronRouterProgress.configure
# spinner : true
Router.onBeforeAction 'dataNotFound'
Router.route '/', ->
@render 'home'
Router.route '/regular'
Router.route '/wait',
waitOn : ->
[
Meteor.subscribe 'wait-collection1'
Meteor.subscribe 'wait-collection2'
]
Router.route '/waitOn',
loadingTemplate : 'loading'
waitOn : ->
[
Meteor.subscribe 'waiton-collection1'
Meteor.subscribe 'waiton-collection2'
]
# Example of using the before with no spinner
Router.route '/noSpinner',
progressSpinner : false
waitOn : ->
[
Meteor.subscribe 'no-spinner-collection1'
Meteor.subscribe 'no-spinner-collection2'
]
Router.route '/noTick',
progressTick : false
waitOn : ->
[
Meteor.subscribe 'no-tick-collection1'
Meteor.subscribe 'no-tick-collection2'
]
Router.route '/delay',
progressDelay : 1500
waitOn : ->
[
Meteor.subscribe 'delay-collection1'
Meteor.subscribe 'delay-collection2'
]
Router.route '/stop',
onBeforeAction : ->
@render 'stopped'
@stop()
Router.route '/notHere',
notFoundTemplate : 'notFound'
waitOn : ->
DelayedCollections['not-here-collection1'].findOne()
Router.route '/disabled',
progress : false