How to use router.navigateByUrl and router.navigate in Angular

navigateByUrl routerLink directive as used like this: <a [routerLink]=”/inbox/33/messages/44″>Open Message 44</a> is just a wrapper around imperative navigation using router and its navigateByUrl method: router.navigateByUrl(‘/inbox/33/messages/44’) as can be seen from the sources: export class RouterLink { … @HostListener(‘click’) onClick(): boolean { … this.router.navigateByUrl(this.urlTree, extras); return true; } So wherever you need to navigate a user … Read more

Difference between [routerLink] and routerLink

You’ll see this in all the directives: When you use brackets, it means you’re passing a bindable property (a variable). <a [routerLink]=”routerLinkVariable”></a> So this variable (routerLinkVariable) could be defined inside your class and it should have a value like below: export class myComponent { public routerLinkVariable = “/home”; // the value of the variable is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)