Thursday, 16 February 2017

NG2- router/URL change function call

NG2- router change function call
============================
import { Router } from '@angular/router'

@Component{

Export Class Mycomponent{

Constructor(_router: Router){

 _router.events.subscribe((val) => {
                this.searchChange = '';
}

}

Ref:http://stackoverflow.com/questions/33520043/how-to-detect-a-route-change-in-angular-2

No comments:

Post a Comment

react19-gh-pages: Github Actions

 Here's a polished LinkedIn post based on your content: 🚀 Deploy Your React 19 + Vite App to GitHub Pages in Minutes! Want to host your...