小编Edr*_*ric的帖子

错误中的错误:方法未在 Angular 应用程序中实现

今天,当打开 WebStorm 并尝试运行我的应用程序时,出现此错误。昨天它工作正常,我不知道如何解决这个问题。请帮忙!我看到了一些和我一样的主题,但它们都曾经处理过cookie,但是我没有任何方法包括cookie方法(

ERROR in Error: Method not implemented.
    at AstTranslator.visitQuote (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/expression.js:225:19)
    at Quote.visit (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler/bundles/compiler.umd.js:7710:28)
    at AstTranslator.translate (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/expression.js:73:24)
    at Object.astToTypescript (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/expression.js:50:27)
    at TcbExpressionTranslator.translate (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:1212:33)
    at tcbExpression (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:1200:27)
    at processAttribute (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:1474:24)
    at Array.forEach (<anonymous>)
    at tcbGetDirectiveInputs (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:1424:19)
    at TcbDirectiveOp.execute (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:342:26)
    at Scope.executeOp (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:975:26)
    at Scope.render (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:888:22)
    at TcbTemplateBodyOp.execute (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:290:54)
    at Scope.executeOp (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:975:26)
    at Scope.render (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:888:22)
    at TcbTemplateBodyOp.execute (/Users/itssmal/Desktop/babybedding/admin/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:290:54)
Run Code Online (Sandbox Code Playgroud)

angular

4
推荐指数
1
解决办法
2020
查看次数

目标入口点“@angular-material-extensions/faq”中的错误缺少依赖项:

在此处输入图片说明

https://angular-material-extensions.github.io/faq/doc/index.html 我尝试添加 import { MatFaqModule } from '@angular-material-extensions/faq'; angular.js 上的这个模块就像它告诉我的一样。请帮助我

angular-material angular

4
推荐指数
1
解决办法
4190
查看次数

如何在没有材质编辑器的情况下访问 maxscript 中的材质?

在 maxscript 中,似乎有两个选项可以通过紧凑的材质编辑器和 Slate 材质编辑器访问材质。问题在于,如果 max 设置为使用 Slate 编辑器,则尝试通过紧凑编辑器 ( currentMaterialLibrary, sceneMaterials, meditMaterials)访问/修改材料的脚本会失败,反之亦然。

有没有办法直接在 maxscript 中访问材料,而不管使用哪个编辑器?

一旦我有了材料,我想:

  1. 从场景中清除未分配的材质,以便在未使用的材质上丢失纹理不会在场景打开/网络渲染中引发错误。
  2. 检查某些材料属性(即光泽细分),以便购买的具有“不必要的高值”的模型不会破坏渲染时间。

editor maxscript

3
推荐指数
1
解决办法
9909
查看次数

在MaterialDateTimePicker中禁用每个月的星期日

我正在使用MaterialDateTimePicker.我想禁用每个月的特定工作日(如星期日).它在这篇文章中提到我们可以使用这个库来做到这一点,但how to disable particular weekdays?我当然可以使用可用的短代码来限制月数,但我不想限制几个月的数量,只是从选择中禁用工作日.

public class MainActivity extends AppCompatActivity implements DatePickerDialog.OnDateSetListener {

    private TextView dateTextView;
    private CheckBox modeDarkDate;
    private CheckBox vibrateDate;
    private CheckBox dismissDate;
    private CheckBox limitDates;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // Find our View instances
        dateTextView = (TextView)findViewById(R.id.date_textview);
        Button dateButton = (Button)findViewById(R.id.date_button);


        modeDarkDate = (CheckBox)findViewById(R.id.mode_dark_date);
        vibrateDate = (CheckBox) findViewById(R.id.vibrate_date);
        dismissDate = (CheckBox) findViewById(R.id.dismiss_date);
        limitDates = (CheckBox) findViewById(R.id.limit_dates);

        // check if picker mode is specified in Style.xml
        modeDarkDate.setChecked(Utils.isDarkTheme(this, modeDarkDate.isChecked())); …
Run Code Online (Sandbox Code Playgroud)

android android-datepicker

3
推荐指数
1
解决办法
4542
查看次数

ng2-smart-table 创建按钮无法正常工作

我正在从 firebase 获取数据并使用ng2-smart-table.

但是,添加数据后添加对话框不会关闭。它仍然以添加的值打开。

这是我的代码:

settings = {
    pager:{perPage:50},
    add: {
        addButtonContent: '<i class="ion-ios-plus-outline"></i>',
        createButtonContent: '<i class="ion-checkmark"></i>',
        cancelButtonContent: '<i class="ion-close"></i>',
        confirmCreate: true,
    },
Run Code Online (Sandbox Code Playgroud)

要创建的函数:

onCreateConfirm(event): any {
    //this service is updating the new data to firebase.
    this.service.createData(event.newData);
    //after that the newdata still on edit mode and not closing it...
}
Run Code Online (Sandbox Code Playgroud)

smart-table angular

3
推荐指数
1
解决办法
6064
查看次数

Angular 2 + Material:无法使用带有第二个参数“text”、“card”等的 map-get

使用Angular 2 (4) + Material,我需要自定义一个组件的主题。我首先尝试使用内置调色板,但不断收到“错误:未定义”。仅当 map-get 传递“primary”、“accent”或“warn”作为第二个参数时才有效:

样式.scss

@import '~@angular/material/theming';
@include mat-core();

@import 'app/app.component.scss-theme';

$default-theme-primary: mat-palette($mat-light-green);
$default-theme-accent:  mat-palette($mat-indigo);
$default-theme-warn:    mat-palette($mat-red);
$default-theme: mat-light-theme($default-theme-primary, $default-theme-accent, $default-theme-warn);

@include angular-material-theme($default-theme);
@include app-component-theme($default-theme);
Run Code Online (Sandbox Code Playgroud)

app.component.scss-theme.scss

@import '~@angular/material/theming';

@mixin app-component-theme($theme){

  $primary: map-get($theme, primary);
  $accent: map-get($theme, accent);

  $text: map-get($theme, text);
  $card: map-get($theme, card);
  $lighter: map-get($theme, lighter);
  $darker: map-get($theme, darker);

  .test{
    font-size: 5em;
    color: mat-color($primary)!important; // works
    // color: mat-color($darker)!important; // fails
    // color: mat-color($lighter)!important; // fails
    // color: mat-color($text)!important; // fails
    // color: mat-color($card)!important; // fails
  }
} …
Run Code Online (Sandbox Code Playgroud)

sass angular-material angular

3
推荐指数
1
解决办法
4059
查看次数

Angular Material MatChipList 不会触发更改,也不会选择事件

我正在尝试向用户显示具有预定义值的芯片列表,并让用户选择其中的一些。我的目标是通过点击选择多个筹码,并根据反应做出反应。

问题是,没有发出单个事件。

我做错了什么?

manage-roles.component.html

<mat-chip-list [selectable]="true" [multiple]="true"
  (change)="onChange($event)">
  <mat-chip *ngFor="let role of possibleRoles"
            [selectable]="true" (selectionChange)="onChipSelect($event)">
    {{role}}
  </mat-chip>
</mat-chip-list>
Run Code Online (Sandbox Code Playgroud)

manage-roles.component.html

@Component({
  selector: 'hr-manage-roles',
  templateUrl: './manage-roles.component.html'
})
export class ManageRolesComponent implements AfterViewInit {
  @ViewChild(MatChipList) chipList: MatChipList;
  possibleRoles: string[] = Roles; // some const

  ngAfterViewInit(): void {
    this.chipList.chipSelectionChanges.subscribe(change => {
      console.log(change); // not fires
    })
  }

  onChange(change: MatChipListChange){
    console.log(change); // not fires
  }

  onChipSelect(change: MatChipSelectionChange) {
    console.log(change); // not fires
  }
}
Run Code Online (Sandbox Code Playgroud)

包.json

  "dependencies": {
    "@angular/animations": "^5.0.0",
    "@angular/cdk": "^5.0.0",
    "@angular/common": "^5.1.0",
    "@angular/compiler": "^5.1.0", …
Run Code Online (Sandbox Code Playgroud)

angular-material angular

3
推荐指数
1
解决办法
8423
查看次数

使用 jq 操作 JSON 文件

我正在使用 jq 来操作 JSON 文件。我需要运行一个搜索数组的命令,找到一个具有等于“someData”的键的对象,然后删除该对象中的一个键,例如,从该对象中删除一个“maxHeight”键 where key等于“someData”。这是一个示例 JSON 文件,我想搜索 'tracks' 数组并找到 label =“cucumber_ChineseLong_v2.gff3” 的对象,然后从该对象中删除 'maxHeight: “200px” '。这甚至可以使用 jq 在单个命令中运行吗?

更新:我想要的输出将是原始 JSON 文件,其中删除了“maxHeight”键:值。

更新:我尝试过的一些命令..

jq '. as $dot|[range(0;length)|select(.maxHeight == "200px")|$dot[.]]' trackList.json > new.json

jq '.tracks[]  | select(.label == "cucumber_ChineseLong_v2.gff3")' trackList.json > test.json
Run Code Online (Sandbox Code Playgroud)
  • Last 命令可以隔离正确的数组,现在我需要知道如何使用 jq 从对象中删除一个键。

JSON 文件

{
  "tracks": [
    {
      "storeClass": "JBrowse/Store/Sequence/StaticChunked",
      "chunkSize": 20000,
      "urlTemplate": "seq/{refseq_dirpath}/{refseq}-",
      "label": "DNA",
      "type": "SequenceTrack",
      "category": "Reference sequence",
      "seqType": "dna",
      "key": "Reference sequence"
    },
    {
      "style": {
        "className": "feature",
        "showLabels": false,
        "arrowheadClass": …
Run Code Online (Sandbox Code Playgroud)

json jq

3
推荐指数
1
解决办法
2848
查看次数

如何使用material-ui v1.0.0-beta.40更改输入焦点上的错误颜色和下划线颜色

我正在使用Material-UI,v1.0.0-beta.40并且想要更改边框颜色和错误文本颜色。

如何才能做到这一点?

reactjs material-design material-ui

3
推荐指数
1
解决办法
3740
查看次数

如何在步进器组件的各个步骤之间共享数据?

有没有办法可以在步进器组件的各个步骤之间共享数据?

例如,在下面的代码中,我希望以 的形式填写的数据app-step1在组件中可用app-step2。

<mat-horizontal-stepper [linear]="true" #stepper="matHorizontalStepper" >
  <mat-step [stepControl]="zerpFormGroup" >
        <ng-template matStepLabel>Step I</ng-template>
        <app-step1 [stepper]="stepper"></app-step1>            
  </mat-step>
  <mat-step [stepControl]="firstFormGroup" >
      <ng-template matStepLabel ">Step II</ng-template><br>      
      <app-step2 [stepper]="stepper"></app-step2>                         
  </mat-step>      
Run Code Online (Sandbox Code Playgroud)

angular-material angular stepper

3
推荐指数
1
解决办法
6672
查看次数