美文网首页
2018-12-06

2018-12-06

作者: 船长夫人_b3cd | 来源:发表于2018-12-06 11:33 被阅读0次

vue的写法:

$router.push('name');

$router.push( {path:'name'} );

$router.push({ path:' name ? a=123'  })或者$router.push({ path:' name ' ,query:{a=123 }  })或者

$router.go(1)

react的写法:

this.$router.push('/home ');

angular的写法:

import {Router} from "@angular/router";

  constructor(public router: Router) {

    // 相当于window.location.href,界面跳转

        router.navigateByUrl('home');

}

相关文章

网友评论

      本文标题:2018-12-06

      本文链接:https://www.haomeiwen.com/subject/imbncqtx.html