We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd4d7bf commit 1389f01Copy full SHA for 1389f01
src/main.js
@@ -1,9 +1,18 @@
1
import Vue from 'vue'
2
import VueRouter from 'vue-router';
3
import App from './App.vue'
4
+import ProductList from './ProductList.vue';
5
+import Cart from './Cart.vue';
6
7
Vue.use(VueRouter);
8
9
+const router = new VueRouter({
10
+ routes: [
11
+ { path: '', component: ProductList },
12
+ { path: '/cart', component: Cart }
13
+ ]
14
+});
15
+
16
Vue.filter('currency', function(value) {
17
let formatter = new Intl.NumberFormat('en-US', {
18
style: 'currency',
@@ -17,6 +26,7 @@ Vue.filter('currency', function(value) {
26
export const eventBus = new Vue();
27
19
28
new Vue({
20
- el: '#app',
21
- render: h => h(App)
29
+ el: '#app',
30
+ render: h => h(App),
31
+ router: router
22
32
})
0 commit comments