Every line of 'routerlink angular2' 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 }
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 }
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 }
33 export function link(route, params) { 34 return () => navigate(route, params); 35 }
19 set routerLink(data) { 20 if (Array.isArray(data)) { 21 this.commands = data; 22 } 23 else { 24 this.commands = [data]; 25 } 26 }
117 ngOnChanges(changes: SimpleChanges): void { this.update(); }
207 visitDirective(ast: DirectiveAst, context: any): any { 208 let updatedInputs = ast.inputs.map(c => c.visit(this, context)); 209 return new DirectiveAst(ast.directive, updatedInputs, ast.hostProperties, ast.hostEvents, 210 ast.sourceSpan); 211 }
23 export function href(router: Router, route: RN, params: RouteParams[RN]) { 24 return router.link(`app.${route}`, params) 25 }
105 ngAfterContentInit(): void { 106 this.links.changes.subscribe(_ => this.update()); 107 this.linksWithHrefs.changes.subscribe(_ => this.update()); 108 this.update(); 109 }
10 constructor( 11 private _activatedroute:ActivatedRoute 12 ) { }