Skip to content

Commit 460e596

Browse files
authored
Update App.js
1 parent b0497d3 commit 460e596

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Router-Example/App.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ class HomeComponent extends ElComponent {
88
<p>Click the links in the navigation bar to go to other pages.</p>
99
</div>
1010
`,
11-
data: {},
12-
route: '/',
11+
data: {}
1312
});
1413
}
1514
}
@@ -24,8 +23,7 @@ class AboutComponent extends ElComponent {
2423
<p>We are a company that specializes in creating web applications.</p>
2524
</div>
2625
`,
27-
data: {},
28-
route: '/about',
26+
data: {}
2927
});
3028
}
3129
}
@@ -40,19 +38,17 @@ class NotFoundComponent extends ElComponent {
4038
<p>The page you are looking for could not be found.</p>
4139
</div>
4240
`,
43-
data: {},
44-
route: '/404',
41+
data: {}
4542
});
4643
}
4744
}
4845

4946
const router = new ElRouter({
50-
el: '#app',
5147
routes: [
5248
{ route: '/', component: HomeComponent },
5349
{ route: '/about', component: AboutComponent },
5450
{ route: '/404', component: NotFoundComponent },
5551
],
5652
defaultRoute: '/',
5753
errorRoute: '/404',
58-
});
54+
});

0 commit comments

Comments
 (0)