小编Sco*_*ary的帖子

Angular 5使用材料,jasmine karma测试失败,带有mat-icon

我正试图用茉莉花业力来

ng test
Run Code Online (Sandbox Code Playgroud)

对Angular Materials的所有问题感到惊讶.几个月前我看到OLDER版材料的例子,md-icon而不是mat-icon等等......

因此,这不能解决抛出的错误

MaterialModule.forRoot()
Run Code Online (Sandbox Code Playgroud)

错误

mat-icon不是已知的元素角度材质

karma-jasmine angular-material angular-material2 angular

11
推荐指数
1
解决办法
8351
查看次数

ngx-bootstrap用于angular-datepicker在似乎什么都没起作用的情况下如何更改主题颜色

我正在尝试更改日期选择器的颜色,但它不起作用

这是ngx-bootstrap日期选择器 https://valor-software.com/ngx-bootstrap/#/datepicker

这是我的html模板

         <div class="form-group">
                        <label class="col-sm-3 control-label" for="date">Date:</label>
                        <div class="col-sm-9">
                                <input type="text"
                                class="form-control"
                                [minDate]="minDate"
                                [maxDate]="maxDate"
                                #dp="bsDatepicker"
                                bsDatepicker [(bsValue)]="bsValue">
                                <button class="btn btn-success" (click)="dp.toggle()">Date Picker</button>
                        </div>
                    </div>
Run Code Online (Sandbox Code Playgroud)

我尝试了各种事情,但我确实意识到这个applyTheme是一个函数

colorTheme = 'theme-green';

bsConfig: Partial<BsDatepickerConfig>;

  applyTheme(pop: any) {
  // create new object on each property change
  // so Angular can catch object reference change
  this.bsConfig = Object.assign({}, { containerClass: this.colorTheme });
  setTimeout(() => {
    pop.show();
  });
}
Run Code Online (Sandbox Code Playgroud)

javascript datepicker ngx-bootstrap angular

6
推荐指数
4
解决办法
6039
查看次数

RouterLink通过替换来中断路由?与%3F

我有console.log正确地显示了路由, customer? 但是[RouterLink]它正在将其转换为?到%3F,我的路线不再可用

模板html

  <a [routerLink]="[items.Url]">
Run Code Online (Sandbox Code Playgroud)

路线文件

 { path: 'customer', component: CustomerComponent, pathMatch: 'full'},
Run Code Online (Sandbox Code Playgroud)

我可以使用模板.. routerLink(某些管道过滤器)以某种方式纠正此问题,还是可以或者必须在我的路由模块ts文件中修复此问题?

怎么样?

我需要

 http://server/customer?  
Run Code Online (Sandbox Code Playgroud)

但我越来越

 http://server/customer%3F  
Run Code Online (Sandbox Code Playgroud)

typescript angular-routing routerlink angular angular-router

5
推荐指数
1
解决办法
949
查看次数