Open oncul opened 7 years ago
This is what I did using Angular and TypeScript.
// All the code you need to set the drawer up
...
listener: (index) => {
this.handleDrawerItemTap(index); // Call the function or place the switch right here
},
...
// All the rest
// Consider index to follow appropriate route. The order is 0-based and matches the order
// of your drawer items initialized in 'templates'. Bear in mind that you need to inject the
// Router into your component.
private handleDrawerItemTap(index : number) : void {
switch (index) {
case 0:
this.router.navigate(["/foo"]);
break;
... // Other cases
}
}
has anyone found an issue with data binding when using the above method?
When the above method is used my page is not populated with data.
However if I can to the exact same page from outside of the sidebar, the data appears as it should.
It could potentially take place, but it is not the problem with sidedrawer, this is due to the router behaviour. Code is needed to replicate the issue.
@apologetics using a custom made side drawer and the exact same functions my issue was resolved. Somehow when the function is called, via the index function of the plugin, ngmodels do not like to work even with data present. This doesnt make much sense to me but I haven't had time to investigate it
@SamuelGRwebfab could you attach the code? Please. I have the same issue, when click the model doesn't work. Thanks.
@SamuelGRwebfab I am having the same problem. Could you tell me how you did it?
I solved it by using this.routerextension.navigate(['/LeaveInfo'], { clearHistory: true, animated: false }) instead of this.router.navigate(["/foo"]);
@ecolasurdo i switch to a custom radsidedrawer instead of using the plugin. however @Saguntamrakar fix may work but would cause history issues is you like to use the goBack function
Hi boys! I have the same problem as @SamuelReeder !! I think that is a sidedrawer problem. If I use a button instead sidedrawer populates perfectly! Please Help!
hello i cant navigate page when i add sidedrawer.