我正在摆弄服务人员,我想使用sw-toolbox,它可以支持快捷式路由。但是,当我使用这些行的任何版本导入它时:
importScripts('node_modules/sw-toolbox/sw-toolbox.js');
importScripts('../node_modules/sw-toolbox/sw-toolbox.js');
importScripts('/node_modules/sw-toolbox/sw-toolbox.js');
我得到以下错误:
A bad HTTP response code (404) was rec
[app-scripts] (node:2056) UnhandledPromiseRejectionWarning: Error: A watch configured to watch the following paths failed to start. It likely that a file referenced does not exist: F:\ionic\myfolder\src\assets\**\*, F:\ionic\myfolder\src\index.html, F:\ionic\myfolder\src\manifest.json, F:\ionic\myfo
我正在使用sw-toolbox和sw-precache at runtime caching选项。但是当我访问url并在devtools中检查网络时,它显示缓存来自服务工作者,而不是首先来自网络(正如我所希望的)。也许我只是不明白这两个库是如何协同工作的。我目前的实现使用sw-precache来缓存我的整个webapp(非常小的webapp),使用运行时缓存选项,我首先使用了一个带有网络处理程序的url模式。我的想法是,即使整个应用程序都被缓存了,当我使用特定的url模式时,页面上使用的数据将从网络中获取,而不是缓存。这是不正确的吗?
我运行cmd:
ionic serve
我的应用程序运行得很完美。但是我在Bourbon.The上有大约50个警告是这样的:
WARNING: [Bourbon] [Deprecation] `justify-content` is deprecated and will be removed in 5.0.0. We suggest using an autom
ated prefixing tool, like Autoprefixer.
Backtrace:
node_modules/bourbon/app/assets/stylesheets/_bourbon-depr
我正在从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
在git回购中有一个包裹。
它能使它与aot兼容。但是在构建我的应用时
ionic build --prod命令,aot将失败,错误如下所示。
[18:02:48] ngc started ...
[18:02:57] typescript error
Unexpected value 'ScrollingHeaderModule in
xxx/node_modules/ionic-scrolling-header/scrolling-header.module.d.ts' imported by the
module
我在我的Ionic 2代码中遇到了一个小问题:
Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.
我没有使用任何关于React或proptypes的东西,但是我得到了前面描述的消息。
我的package.json:
"dependencies": {
"@angular/common": "2.4.8",
"@angular/compiler":
我没有改变我的应用程序,UI是在离子图形用户界面创建者中创建的,但是当尝试运行ionic serve时,它仍然崩溃。
下面是我遇到的错误:
[11:17:39] sass: stdin, line: 1
File to import not found or unreadable: /var/lndFinal/src/theme/variables.scss. Parent style sheet: stdin
[11:17:40] dev server running: http://localhost:8100/
[OK] Development se