小编Ily*_*uja的帖子

“Microsoft.AspNetCore.SpaServices”命名空间中不存在“AngularCli”

我想使用 Microsoft.AspNetCore.SpaServices.AngularCli 但得到这样的错误(“Microsoft.AspNetCore.SpaServices”命名空间中不存在“AngularCli”)。我用命令 dotnet add package Microsoft.AspNetCore.SpaServices --version 2.0.1 添加了 packege,但我仍然有 SpaServices 的问题

asp.net-core-2.0 angular6

6
推荐指数
1
解决办法
2629
查看次数

如何禁用自动键值排序 Angular 6

我在 ts 文件中创建了数组,并使用 ngFor 从数组中获取元素,但是当我使用键值 Angular 时,它会自动对数组进行排序。如何保存创建的数组之类的顺序。

TS代码:

filterListingTypeItems: { [key: string]: object } = {


  'For sale': [
      'For sale',
      'By Agent',
      'By ownre',
      'New Construction',
      'Foreclosures',
      'Coming Soon',
    ],
    'Potential listings': [
      'Potential listings',
      'Foreclosed',
      'Pre-Foreclosure',
      'Make Me Move',
    ],
    'For Rent': ['For Rent'],
    'Recently sold': ['Recently sold'],
    _________________________: ['Open House only', 'Pending & Under Contract'],
}
Run Code Online (Sandbox Code Playgroud)

HTML代码(角度材料):

<mat-optgroup
          *ngFor="let listingOptions of (filterListingTypeItems | keyvalue)"
          [label]="listingOptions.key"
        >
          <mat-option
            *ngFor="let listingOption of listingOptions.value"
            [value]="listingOption"
            >{{ listingOption }}</mat-option
          >
</mat-optgroup> …
Run Code Online (Sandbox Code Playgroud)

typescript angular

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

标签 统计

angular ×1

angular6 ×1

asp.net-core-2.0 ×1

typescript ×1