小编Nar*_*dra的帖子

nativescript中的window对象

我需要创建一个窗口对象,以便在iframe中加载的外部文件可以调用nativescript函数.

我特别需要窗口对象,因为我加载的文件可以是符合LMS的符合(SCORM)的任何文件.

谢谢

编辑:我加载的文件是符合SCORM的文件.他们搜索window.API对象/ window.parent.API等,以便开始与已加载它们的容器进行通信.我不能改变那个文件.

告诉我是否需要更多细节.

iframe nativescript

7
推荐指数
1
解决办法
753
查看次数

将现有的 angular 5 项目转换为 ionic 3 项目

我在一个 angular 5 项目上工作了 3 个月,我正在使用 Cordova 构建该项目以导出 android 和 Ios 应用程序。现在我的应用程序需要一些本机功能,但我找不到将我的 angular 5 Web 应用程序转换或包装到 Ionic 3 以使用 Ionic 的本机功能的方法。有什么方法可以轻松转换它吗?无需更改用户界面。

wrapper cordova ionic-framework angular

4
推荐指数
1
解决办法
6448
查看次数

如何以适当方式为不支持.webp的浏览器提供.JPG?

我打算WebP在我的电子商务网站上使用,根据Lighthouse测试可以大大提高性能。但是问题是。我们仍然有使用iOS且不支持WebP格式的用户。我需要有关传递图像的正确方式以及如何让用户以JPG下载图像的更多信息。

在我的服务器上。我有两种格式供后备使用。

html javascript css php webp

4
推荐指数
1
解决办法
1794
查看次数

有没有办法在Windows上构建IOS应用程序?

我正在开发本机应用程序,但我有一台Windows PC.是否有在Windows上构建IOS应用程序的实际方法?我可以在Windows上运行ios模拟器吗?我研究过,但找不到实际的方法.

我尝试在Virtual Box上安装MacOS Sierra,但它一直在重启.

我需要两者来构建它吗?

谢谢回复!

android ios nativescript react-native

3
推荐指数
1
解决办法
3248
查看次数

预期有2个参数,但得到1.ts(2554)core.d.ts(8064,47):未提供'opts'的参数

错误

预期有2个参数,但得到1.ts(2554)core.d.ts(8064,47):未提供'opts'的参数。

代码来自NativeScript市场

https://play.nativescript.org/?template=play-ng&id=Hqp5UQ&v=3073

我已经逐字逐句地携带了代码,并且在导出类中遇到了错误

@ViewChild("password") password: ElementRef;
@ViewChild("confirmPassword") confirmPassword: ElementRef;
Run Code Online (Sandbox Code Playgroud)

有谁知道如何解决这个问题?

import { Component, ElementRef, ViewChild } from "@angular/core";
import { alert, prompt } from "tns-core-modules/ui/dialogs";
import { Page } from "tns-core-modules/ui/page";
import { RouterExtensions } from "nativescript-angular/router";

import { User } from "../shared/user.model";
import { UserService } from "../shared/user.service";

@Component({
    selector: "app-login",
    moduleId: module.id,
    templateUrl: "./login.component.html",
    styleUrls: ["./login.component.css"]
})
export class LoginComponent {
    isLoggingIn = true;
    user: User;
    processing = false;
    @ViewChild("password") password: ElementRef;
    @ViewChild("confirmPassword") confirmPassword: ElementRef;

    constructor(private …
Run Code Online (Sandbox Code Playgroud)

typescript nativescript nativescript-angular

3
推荐指数
1
解决办法
5019
查看次数