ADDED POSSIBILITY TO INIT VIEW AFTER RELOADING
See original GitHub issueUse IReloadable
interface for achieving it
public partial class MainPage : ContentPage, IReloadable
{
public void OnLoaded()
{
Btn.Clicked += Handle_Clicked;
}
void Handle_Clicked(object sender, System.EventArgs e)
{
Btn.Text = (int.Parse(Btn.Text) + 1).ToString();
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Angular 5 - How to reload a component after it is initialized
Ok the trick is that if the model is updated, the component need not be reloaded. The view is automatically updated.
Read more >Component Lifecycle
A component instance has a lifecycle that starts when Angular instantiates the component class and renders the component view along with its child...
Read more >Angular Lifecycle Hooks: ngOnChanges, ngOnInit, and more
ngAfterViewInit fires once after the view DOM finishes initializing. The view always loads right after the content. ngAfterViewInit waits on @ ...
Read more >Angular: Reload/Refresh a Component or Entire ...
An Angular tutorial on how to reload/refresh a single component or the entire application and reuse the logic across multiple components.
Read more >Loading Components Dynamically in an Angular App
A tutorial that shows how to create an Angular app with dynamic component loading.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ok, it works now and I have no idea why it fails. Also OnLoaded() is called on XAML change in UWP. I use
public async void OnLoaded()
and it works so far. I hope it doesn’t produce hangs in future.In past this caused deadlocks for me, so I try to avoid it now.