前沿web开发框架

Angular

Angular 是一个开发平台。它能帮你更轻松的构建 Web 应用。Angular 集声明式模板、依赖注入、端到端工具和一些最佳实践于一身,为你解决开发方面的各种挑战。Angular 为开发者提升构建 Web、手机或桌面应用的能力。

ng build的参数配置

2020年06月05日

Angular程序编写完成,需要对程序进行构建,具体命令如下:ng build <project> [options]<project>:要构建的项目的名称。可以是应用程序或库ng build projectName --aot=true --buildOptimizer=true --optimization=true --prod=true--aot=true:使用“提前编译”进行构建--bu...

Material icon outline

2020年06月04日

Material icons提供了丰富的图标库,在Angular中可以很容易使用Material。Material icons提供了Filled和Outline样式的图片,默认使用的是Filled样式的图片,但是如果需要转换成Outline样式的图标,应该怎么做呢?you can use outline one as below ex:<mat-icon>info_outline</mat-ico...

Angular 404路由问题

2020年05月31日

最近再接触到Angular,顺便谢谢项目。再项目中可能有些页面找不到,需要报404错误,再Angular路由中如何配置404页面呢?新的路由器可以更好地处理'**'路径规范中缺失的路由。下面是示例代码:const routes: Routes = [ {path: '', redirectTo: 'home', pathMatch: 'full'}, {path: 'home', compon...

ng-template

2020年05月27日

Angular ng-template, ng-container and ngTemplateOutlet - The Complete Guide To Angular Templates

mat-menu自定义样式 mat-menu自定义宽度

2020年05月27日

最近在使用mat-menu,自定义这个组件的样式很难(包括宽度,内部的样式等)。但是如果将 View Encapsulation设置为None,则很容易修改样式,具体代码如下:@Component({ templateUrl: './my.component.html' , styleUrls: ['./my.component.css'], encapsulati...

How to Set HTML Meta tags using Angular 4

2020年05月26日

这篇文章很详细的介绍了如何操作html element 里面的mate标签,文章地址:How to Set HTML Meta tags using Angular 4

Typescript extend super

2020年05月26日

class Animal { name: string; constructor(theName: string) { this.name = theName; } move(distanceInMeters: number = 0) { console.log(`${this.name} moved ${distanceInMeters}m.`); ...

Typescript ${}不起作用的问题

2020年05月26日

最近在使用Typescript里面的模板字符串,但是不起作用。具体代码如下:// 设置title this._commService.setTitle('${ this.result.phoneNumber } info');原来不是单引号,是键盘Tab上面的那个符号。修改之后,代码如下:// 设置title this._commService.setTitle(`${ this.re...