Types of declaration methods Angular 6 声明方法类型 Angular 6

huangapple go评论76阅读模式
英文:

Types of declaration methods Angular 6

问题

我对以下两种声明有些困惑。

```typescript
filterabcData: abcHeader[] = [];

searchedabcDetails = new abcHeader(); 

有人可以帮助我吗?


<details>
<summary>英文:</summary>

I am having some confusion about below 2 types of declarations.

```typescript
filterabcData: abcHeader[] = [];

and

searchedabcDetails = new abcHeader(); 

Anyone help me for this.

答案1

得分: 1

  1. 第一个声明表示filterabcData是一个数组,其中包含abcHeader类型的项目。
  2. 第二个声明指出你正在创建一个abcHeader类的对象,并将其存储在searchedabcDetails中。
英文:
  1. First one declaration says that filterabcData is an array having
    items of abcHeader type.
  2. Second declaration is pointing that you are creating an object of abcHeader class and storing it inside searchedabcDetails.

huangapple
  • 本文由 发表于 2020年1月6日 17:26:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/59609547.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定