Commit 0b7006a1caf9cf26c46b841bad35d0b42b68cd51
1 parent
1eaabc5a2d
Exists in
master
and in
2 other branches
solved bug regarding routing in CourseDetails.vue
Showing
3 changed files
with
7 additions
and
5 deletions
Show diff stats
src/App.vue
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | <div class="page-wrapper"> |
9 | 9 | <!-- Header toolbar with Seacrh --> |
10 | 10 | <app-toolbar class="app--toolbar"></app-toolbar> |
11 | - <router-view></router-view> | |
11 | + <router-view :key="$route.fullPath"></router-view> | |
12 | 12 | </div> |
13 | 13 | <!-- App Footer --> |
14 | 14 | </v-content> | ... | ... |
src/Services/GetApis.js
src/pages/Dashboard/CourseDetails.vue
... | ... | @@ -148,9 +148,10 @@ export default { |
148 | 148 | |
149 | 149 | /* If the response is null then dont route */ |
150 | 150 | if (response.data.data.length > 0) { |
151 | - this.$router.push({ | |
152 | - name: "Course Details", | |
153 | - query: { courseId: courseId } | |
151 | + // REQUIRED TO WAIT FOR UPDATE CYCLE | |
152 | + this.$nextTick(() => { | |
153 | + // this.filters.locEmitted = "emitted"; | |
154 | + this.$router.push({ query: { courseId: courseId } }); | |
154 | 155 | }); |
155 | 156 | } else { |
156 | 157 | this.seeSnackbar("No Data Available", "warning"); |
... | ... | @@ -158,11 +159,13 @@ export default { |
158 | 159 | } |
159 | 160 | }, |
160 | 161 | async created() { |
162 | + console.log("its working"); | |
161 | 163 | /* getParticularCourseDetail- To get courseDetail - defined in GetApis.js*/ |
162 | 164 | let response = await this.getParticularCourseDetail( |
163 | 165 | this.$route.query.courseId |
164 | 166 | ); |
165 | 167 | this.courseDetails = response.data.data; |
168 | + console.log("its working courseDetails - ", this.courseDetails); | |
166 | 169 | |
167 | 170 | /* getStudentCourses - to get courseData - defined in GetApis.js*/ |
168 | 171 | await this.getStudentCourses({ | ... | ... |