ionic framework - Can we use event.preventDefault() in angularjs application? -


in ionic application while page load each time it's loading login page it's coming profile page . think if works can can use in profile controller each time can see current page getting refresh.

can body me out achieve this?

again when navigating each page using $state.go("app.profile") or $state.go("app.signup"), each time it's loading login.html splash screen & later it's navigating requested page.

my requirement if refresh profile page or signup page should reload current page not login page.

any appreciated.

you need pass event function , handle there, it's clean , best way doing it:

in view(html):

<button (click)="clicked($event)">click</button> 

and in javascript (typescript):

clicked(e) {   e.preventdefault();   //then whatever should here } 

Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

android - Unable to generate FCM token from dynamically instantiated Firebase -