【发布时间】:2016-11-30 15:29:39
【问题描述】:
是否有 Angular 2 方法可以在 NativeScript 中完成自定义 AppDelegate,例如 this?我已经看到了如何在没有 Angular 的情况下执行此操作的示例,我只是不确定在 Angular 2 中在哪里注册 AppDelegate。
【问题讨论】:
标签: ios angular mobile nativescript angular2-nativescript
是否有 Angular 2 方法可以在 NativeScript 中完成自定义 AppDelegate,例如 this?我已经看到了如何在没有 Angular 的情况下执行此操作的示例,我只是不确定在 Angular 2 中在哪里注册 AppDelegate。
【问题讨论】:
标签: ios angular mobile nativescript angular2-nativescript
您可以将其添加到您的 main.ts:
import application = require("application");
import { CustomAppDelegate } from "./custom-app-delegate";
if (application.ios {
application.ios.delegate = CustomAppDelegate;
}
platformNativeScriptDynamic().bootstrapModule(AppModule);
【讨论】:
Nativescript-vue 我收到TypeError: Attempted to assign to readonly property