Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NativeScript - Angular 2 Custom AppDelegate

Is there an Angular 2 way to accomplish a custom AppDelegate like this in NativeScript? I've seen examples of how to do this without Angular, I'm just not sure where to register the AppDelegate in Angular 2.

like image 976
Becky Lehmann Avatar asked Mar 10 '23 13:03

Becky Lehmann


1 Answers

you can just add this to your main.ts:

import application = require("application");
import { CustomAppDelegate } from "./custom-app-delegate";
if (application.ios {
   application.ios.delegate = CustomAppDelegate;
}
platformNativeScriptDynamic().bootstrapModule(AppModule);
like image 150
hypery2k Avatar answered Mar 28 '23 05:03

hypery2k