我试图从storage中的getToken()中检索令牌,而不是在refreshToken()中使用它来通过将令牌传递给(this.jwtHelper.isTokenExpired(this.token)来查看令牌是否过期,(this.jwtHelper.isTokenExpired(this.token)将根据令牌是否过期返回真或假。我已经在refreshToken()中发表了评论,在这里我得到了以下错误
错误1:
Error: TS2345:Argument of type '(response: Response) => void' is not assignabl
我正在将已经在工作的Angular 10 web-app修改为ionic原生应用程序,这时我遇到了一些CORS问题。因为我不能改变BE上的任何东西,所以我遇到了native-HTTP插件Ionic has。 我遵循了Angular在how to make an interceptor和这篇解释how to implement both HttpClient and Ionic's native HTTP的文章中的说明,但我遇到了新的问题。 使用文章中的代码,TS抱怨这一行: headers: nativeHttpResponse.headers (property) headers?
我正在从google获取details.ts文件功能中的数据,我已经为此创建了服务,如下所示。它的显示打字错误Property 'then' does not exist on type 'void'
this.typeApi.getTypeDetails(baseUrl).then(data => {
});
在type-api.service.ts文件中,我从google获取数据如下:
import { Injectable } from '@angular/core';
import { Http /*, Response*/ } f
我正在为一个大学项目(一个ToDoList移动应用程序)学习Ionic4和Angular。我正在尝试使用AngularFirestore.collection....valueChanges()从我的firestore数据库中获取一些数据,并将其存储在我的自定义服务的成员变量中,以便稍后将其提供给组件。但我在Visual Studio Code和ionic console中都收到了TS2322错误。
错误如下:
Type 'Observable<ToDoList[]>' is missing the following properties from type Ob
我已经被离子4和Firestore困了几个月了。当我去Firestore和Ionic 4的时候,很多东西都坏了,所以我从头开始。我正在学习AngularFirebase Ionic Google Login for iOS and Android Youtube教程,我得到了以下错误: src/app/pages/login/login.page.ts(35,7)中的ng错误:错误用户:类型‘TS2322’不可分配给类型'void‘。 我使用了与教程中完全相同的代码,但不确定为什么会出现这个错误。 import { Component, OnInit } from '
我在我的登录页面中导入一个服务,但是当它给我这个错误时,我的服务文件中有所有的装饰器,我在我的应用模块中有所有正确的导入。但我不知道为什么这个错误还会出现。我一直以同样的方式导入服务,但我不知道它到底需要什么才能将该服务注入组件中。
Uncaught (in promise): Error: This constructor is not compatible with Angular Dependency Injection because its dependency at index 2 of the parameter list is invalid.
This can happen
背景
我正在使用离子4+安古拉火+火焰基地来制作这个应用程序。package.json的详细信息如下所示。
问题
实际上,当我运行ionic serve时,我有很多错误。但是这很奇怪,因为这个错误只在我运行ionic serve之后发生一次。当我重新保存该文件时,查找-resto.ts(没有任何更改)问题会显示出来!
它开始困扰我,因为它抛出错误的离子pro和离子DevApp。
以下是错误:
1. Typescript Error Type 'AngularFireList<ProfileResto>' is not assignable to type '
我正在尝试使用xplat生成新的应用程序
我使用的是节点版本11.15
我试着做以下事情
npx create-xplat-workspace myworkspace
我生成所有内容,直到它出现提示
? Would you like to generate xplat supporting architecture now? You can also generate later with: nx generate @nstudio/xplat:init not right now [just add xplat tooling] electron [ge
我正在尝试一个移动应用程序开发与地图集成。我目前正在尝试使用: Node Ionic Cordova Cordova Google Maps插件Windows 10 (build 1803)。
当创建空白模板时,应用程序本身构建正确,并将加载良好。但是,当我添加对google地图插件的引用时,它会导致以下错误:
[INFO] Looks like @ionic/app-scripts isn't installed in this project.
This package is required for this command to work properly.