Every line of 'routerlink vue' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
42 function RouterLink(elementRef, _router, _location) { 43 this._router = _router; 44 this._location = _location; 45 this._domEl = elementRef.domElement; 46 this._params = collection_1.StringMapWrapper.create(); 47 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
19 set routerLink(data) { 20 if (Array.isArray(data)) { 21 this.commands = data; 22 } 23 else { 24 this.commands = [data]; 25 } 26 }
35 routerLink(content) { 36 const component = content.path.split('/')[1]; 37 const path = `/#/components/${component}/${component}-demo`; 38 window.location.href = window.location.origin + this.suffix(path); 39 }
75 function RouterLinkWithHref(router, route, locationStrategy) { 76 var _this = this; 77 this.router = router; 78 this.route = route; 79 this.locationStrategy = locationStrategy; 80 this.commands = []; 81 this.subscription = router.events.subscribe(function (s) { 82 if (s instanceof router_1.NavigationEnd) { 83 _this.updateTargetUrlAndHref(); 84 } 85 }); 86 }
23 export function href<RN extends Routes>(router: Router, route: RN, params: RouteParams[RN]) { 24 return router.link(`app.${route}`, params) 25 }
81 private isLinkActive(router: Router): (link: (RouterLink | RouterLinkWithHref)) => boolean { 82 return (link: RouterLink | RouterLinkWithHref) => 83 router.isActive(link.urlTree, this.exact); 84 }
33 export function link(route, params) { 34 return () => navigate(route, params); 35 }
21 constructor(private router: Router, private hie: HierarchyService) {}
18 get LinkComponent() { 19 return this.props.isExternal ? OutLink : Link 20 }
55 removeLink(link: HTMLElement) { 56 const i = this.links.indexOf(link); 57 if (i < 0) { 58 return; 59 } 60 this.links = this.links.splice(i, 1); 61 }