Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. //CODE FOR CLICKING BUTTON
  2. <button type="button" class="btn btn-primary-outline pull-right" (click)="redirect();"><i class="fa fa-plus"></i> change</button>
  3.  
  4. //CODE FOR CALLING FUNCTION
  5. constructor(private router: Router,public zone: NgZone) { }
  6. redirect(){
  7.  
  8. this.router.navigate('/store');
  9. }
  10.  
  11. //CODE FOR ROUTER DEFINED
  12. RouterModule.forRoot([
  13.  
  14. {path:'',pathMatch: 'full',component:Dashboard1Component},
  15. {path:'store',component:Store1Component},
  16.  
  17. ])
  18. ],
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement