【问题标题】:Ionic cannot find name 'AES256' while importing AES256Ionic 在导入 AES256 时找不到名称“AES256”
【发布时间】:2019-06-23 04:05:07
【问题描述】:

参考离子文档: https://ionicframework.com/docs/native/aes-256/

我通过以下方式添加了 AES-256 加密包:

import { AES256 } from '@ionic-native/aes-256';

但是我收到了这个错误:

打字稿:找不到名称“AES256”

当我试图在构造函数中定义相应的变量时:

private aes256: AES256

离子版本:4.8.0

【问题讨论】:

    标签: typescript ionic-framework encryption


    【解决方案1】:

    我通过查看其他库的相同问题找到了解决方案。 该问题的解决方案是在导入中添加“ngx”:

    import { AES256 } from '@ionic-native/aes-256/ngx';
    

    【讨论】:

    • 但是 ngx 在 aes-256 包中不可用
    • 你要下载最新的包
    猜你喜欢
    • 1970-01-01
    • 2018-08-19
    • 1970-01-01
    • 2014-08-01
    • 2015-07-12
    • 2015-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多