“2020年5月”存档文章有39

Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class

今天在使用in-memory-web-api的时候报如下错误:Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class具体截图如下:之后再github找到了答案,具体解决方案如下:My temporary solution was to add: "enableIvy"...

json理解

最近在Angular里面需要使用到json返回数据,自己写了一个json文件,以前直接使用,没有发现问题。但是今天自己写,有很多问题,经过研究终于搞清楚了。首先参考json官方网站:介绍 JSON可以看到Json的一些数据类型(对象,数组,值、字符串、数值)。下面是一个json文件的具体内容:{ "phone_number_list":[ { ...

使用Angular in-memory-web-api 无任何数据

最近在参照这篇文章,使用in-memory-web-api,模拟获取后端数据,但是怎么也获取不到数据,具体NgModel代码如下: imports: [ BrowserModule, SharedModule, BrowserAnimationsModule, InMemoryWebApiModule.forRoot(InMemoryDataService...

WebStorm .http文件详解

最近在使用WebStorm编写Angualr程序的时候,有一个http request,截图如下:通过这个工具我们可以完成绝大部分http请求,是一个不错的post-man替代工具,接下来详细讲讲它如何简化你的操作。请求示例所有HTTP请求需要在后缀为.http的文件中进行,新建一个test.http文件。基本格式为:请求类型(如:GET, POST,PUT) + 请求地址(http://www...

Angular scroll top demo

<a class="scroll-to-top" id="backTopBtn" (click)="scrollTop($event)"></a>export class ScrollTopComponent { scrollTop(e) { const scrollToTop = window.setInterval(() => { const pos = wind...

npm audit fix 命令

最近需要更新Angular一些安装包,出现了如下提示:found 2 low severity vulnerabilities run `npm audit fix` to fix them, or `npm audit` for details发现两个严重程度较低的漏洞,运行'npm audit fix'进行修复,或者运行'npm audit'查看详情。具体npm audit fix是什么命令...

使用Python执行Linux命令

使用Python执行Linux命令,具体可看这篇文章:Python Execute Unix / Linux Command Examples

sogou IP Spider issue

111.202.101.126~111.202.101.185未确认。