@@ -87,6 +87,14 @@ const Quux = {
87
87
}
88
88
}
89
89
90
+ const Baf = {
91
+ template : `
92
+ <div>
93
+ <p> baf, you should never see this</p>
94
+ </div>
95
+ `
96
+ }
97
+
90
98
const router = new VueRouter ( {
91
99
mode : 'history' ,
92
100
base : __dirname ,
@@ -106,15 +114,19 @@ const router = new VueRouter({
106
114
// Qux implements an in-component beforeRouteEnter hook
107
115
{ path : '/qux' , component : Qux } ,
108
116
109
- // in-component beforeRouteEnter hook for async components
117
+ // in-component beforeRouteEnter hook for async components
110
118
{ path : '/qux-async' , component : resolve => {
111
119
setTimeout ( ( ) => {
112
120
resolve ( Qux )
113
121
} , 0 )
114
122
} } ,
115
123
116
124
// in-component beforeRouteUpdate hook
117
- { path : '/quux/:id' , component : Quux }
125
+ { path : '/quux/:id' , component : Quux } ,
126
+
127
+ // Baf implements declarative "disabled" in template
128
+ { path : '/baf' , component : Baf }
129
+
118
130
]
119
131
} )
120
132
@@ -140,6 +152,7 @@ new Vue({
140
152
<li><router-link to="/qux-async">/qux-async</router-link></li>
141
153
<li><router-link to="/quux/1">/quux/1</router-link></li>
142
154
<li><router-link to="/quux/2">/quux/2</router-link></li>
155
+ <li><router-link to="/baf" disabled>/baf</router-link></li>
143
156
</ul>
144
157
<router-view class="view"></router-view>
145
158
</div>
0 commit comments