Skip to content

Commit af03672

Browse files
author
dplrm
committed
add code that triggers a warning
1 parent aa69d16 commit af03672

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/components/HelloWorld.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,17 @@
3131
</template>
3232

3333
<script lang="ts">
34-
import { Component, Prop, Vue } from 'vue-property-decorator';
34+
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
35+
import { Route } from 'vue-router';
3536
3637
@Component
3738
export default class HelloWorld extends Vue {
3839
@Prop() private msg!: string;
40+
41+
@Watch('$route')
42+
private async onParamChanged(newRoute: Route, oldRoute: Route) {
43+
console.log(oldRoute, newRoute);
44+
}
3945
}
4046
</script>
4147

0 commit comments

Comments
 (0)