“2019年5月”存档文章有35

网站数据库保存信用卡的相关问题

最近在研究安全相关问题,其中一个比较关心的就是关于网站保存信用卡的相关问题。我们知道,在国外信用卡其实不需要密码就可支付。你只需要知道信用卡账号,有效期,姓名,以及CVV就可以支付。如果网站保存这些信息,那必定导致黑客虎视眈眈。只要盗取了这些信息,就可以用于盗刷。所以如果自己没有能力保证网站程序安全最好不要保存客户信用卡相关信息,否则客户信息被盗,作为网站负责人,你是需要负法律责任的。还有一个行业...

Angular HttpClient get 提交方式

最近在学习Angular HttpClient的Get提交方式,首先看httpClient的源代码: /** * Constructs a `GET` request that interprets the body as a JSON object and * returns the response body as a JSON object. * ...

删除分支

在提交完成之后,本地分支和远程分支如果没有什么用,可以删除。使分支不至于过多,保持整个代码库的整洁,易于管理。首先查看所在分支:git branch -a删除本地分支:$ > git branch -D feature-privateNumber Deleted branch feature-privateNumber (was aab06d0).再次查看是否删除成功:$ > git branc...

Error: StaticInjectorError(AppModule)[VerifyEmailComponent -> AccountService]:

在Angular中如果编写了一个服务,在app.module中没有导入,你调用的过程中会出现如下错误:Error: StaticInjectorError(AppModule)[VerifyEmailComponent -> AccountService]: StaticInjectorError(Platform: core)[VerifyEmailComponent -> AccountS...

Error: StaticInjectorError(AppModule)[NgIf -> TemplateRef]

在做ngIf判断的时候,出现了如下错误:Error: StaticInjectorError(AppModule)[NgIf -> TemplateRef]出现问题的原因:写法错误,原来写法如下:<button mat-flat-button ngIf="emailConfirmed"><span>重新发送</span></button>解决方案:前面加一个*,代码如下:<button mat-f...

一个CanActivate和CanActivateChild很好的例子

Angular 2/4 Route Guards: CanActivate and CanActivateChild Example

A function whose declared type is neither 'void' nor 'any' must return a value.

最近使用Observable的方式请求资源,报如下错误:A function whose declared type is neither 'void' nor 'any' must return a value.出现问题的原因:首先看看代码是如何写的:getUserIdByEmail(UserId: string): Observable<any> { const body: stri...

this.router.navigate 无法获取参数相关问题

最近在使用Angular 4,点击跳转的写法如下:this.router.navigate( this.router.createUrlTree(['account/verifyemail'], {queryParams: userId, skipLocationChange: true, preserveQueryParams: true }));定义了一个查询参数UserId,s...