哪位大神能够帮我看下我写的vue返回上一页的代码哪里出错了,一直显示this.$router is undefined

<!DOCTYPE html>
<meta charset="utf-8"/>
<html>

<script src="vue.js"></script>
<script src="vue-router.js"></script>


<body>

<div id="app">
    <button @click="goback">goback</button>
</div>

</body>
<script>
    var app = new Vue({
        el:"#app",
        data:{

        },
        methods:{
            goback:function(){
                this.$router.go(-1);
            }
        }
    })
</script>

</html>
var app = new Vue({
        router,   //少了这个
        el:"#app",
        data:{

        },
        methods:{
            goback:function(){
                this.$router.go(-1);
            }
        }
    })

缺少实例化 router