File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 7
7
< body >
8
8
< div id ="app ">
9
9
< div class ="nav ">
10
- < a href ="#a "> Go to page A</ a >
11
- < a href ="#b "> Go to page B</ a >
10
+ < a href ="#page- a "> Go to page A</ a >
11
+ < a href ="#page- b "> Go to page B</ a >
12
12
</ div >
13
13
< component is ="{{view}} "> </ component >
14
14
</ div >
Original file line number Diff line number Diff line change 3
3
"version" : " 1.0.0" ,
4
4
"description" : " Vue project example using Webpack as the bundler." ,
5
5
"main" : " src/main.js" ,
6
- "dependencies" : {
7
- "vue" : " yyx990803/vue#dev"
8
- },
9
6
"devDependencies" : {
10
7
"css-loader" : " ^0.12.1" ,
11
8
"html-loader" : " ^0.3.0" ,
31
28
"bugs" : {
32
29
"url" : " https://github.com/vuejs/vue-webpack-example/issues"
33
30
},
34
- "homepage" : " https://github.com/vuejs/vue-webpack-example"
31
+ "homepage" : " https://github.com/vuejs/vue-webpack-example" ,
32
+ "dependencies" : {
33
+ "vue" : " ^0.12.8"
34
+ }
35
35
}
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ var Vue = require('vue')
7
7
var app = new Vue ( {
8
8
el : '#app' ,
9
9
data : {
10
- view : 'a'
10
+ view : 'page- a'
11
11
} ,
12
12
components : {
13
13
// define the main pages as async components.
14
- a : function ( resolve ) {
14
+ 'page-a' : function ( resolve ) {
15
15
require ( [ './views/a' ] , resolve )
16
16
} ,
17
- b : function ( resolve ) {
17
+ 'page-b' : function ( resolve ) {
18
18
require ( [ './views/b' ] , resolve )
19
19
}
20
20
}
@@ -29,7 +29,7 @@ var app = new Vue({
29
29
*/
30
30
31
31
function route ( ) {
32
- app . view = window . location . hash . slice ( 1 ) || 'a'
32
+ app . view = window . location . hash . slice ( 1 ) || 'page- a'
33
33
}
34
34
35
35
window . addEventListener ( 'hashchange' , route )
You can’t perform that action at this time.
0 commit comments