![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
前端
六月的尾巴
路漫漫其修远兮,吾将上下而求索
展开
-
angular中的?和 !作用
最近在代码中发现同事调用变量时使用了?这个符号。出于好奇,上网搜了下其使用方法,发现还有和它类似的感叹号!,一并记录下来。?用来检查问号前面的变量是否为null或者undefined时,程序不会出错。stu3: Student;<h1>stu3 id{{stu3?.id}}</h1> // stu3 id<h1>stu3 name{{stu3?.name}}</h1> // stu3 name比如上面的例子原创 2021-05-14 14:39:58 · 1911 阅读 · 1 评论 -
html文字过长显示省略号
<p style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">原创 2020-11-23 10:57:18 · 2106 阅读 · 0 评论 -
npm -v Error: Failed to replace env in config: ${APPDATA}
Error: Failed to replace env in config: ${APPDATA} at D:\Program Files\nodejs\node_modules\npm\lib\config\core.js:417:13 at String.replace (<anonymous>) at envReplace (D:\Program Files\nodejs\node_modules\npm\lib\config\core.js:413:12)转载 2020-08-13 17:14:01 · 1219 阅读 · 0 评论