
angular
AndreaH
每天进步一点点!
展开
-
cookie跨域问题
最近使用angular做项目,后端走cookie session认证机制,登陆接口服务端有set-cookie,后台也做了跨域处理 ,但是发起请求时浏览器请求里没有携带cookie。一直以为是angular机制引起的,然而跟angular没有关系。跨域请求由于安全性机制,默认是不携带cookie。解决方法:前后端配合,均需要修改。后端:app.all('*', function (req, res...原创 2018-04-03 11:09:42 · 1322 阅读 · 0 评论 -
angular 中使用css预处理器
在angular项目中,默认的样式文件为.css,如果我们想使用css预处理器,如何创建项目或是修改原css的项目呢,下面以scss为例。1、创建新项目时:ng new angularProjectName --style=scss或 ng new angularPeojectName --style scss2、修改原有项目: 我们都知道,在angular 6.x以后,生成的angular...原创 2018-05-30 17:51:30 · 1088 阅读 · 2 评论 -
More than one module matches. Use skip-import option to skip importing the component into the closes
今天在angular中执行 ng g c componentName 时,出现More than one module matches. Use skip-import option to skip importing the component into the closes的报错信息,下面主要说一下产生原因及解决方法。产生原因:在该工程下,有两个module文件,我在该项目下有一个app.mo...原创 2018-05-30 18:07:09 · 6029 阅读 · 2 评论 -
angular7新特性
Angular 是最流行的 Web 应用程序开发框架之一。随着 Angular 7 的发布,它为 Web 开发人员带来了更多功能,包括核心框架、Angular Material、与主要版本保持同步的 CLI 和工具链,并且还有了几个主要合作伙伴。依赖更新TypeScript 3.1 在使用 Angular 7 时,必须使用 TypeScript 的最新版本。RxJS ...原创 2019-03-01 15:05:26 · 2517 阅读 · 2 评论