<page [pagetitle]="pagePath">
<content>
<section title="Landlords" [isExpanded]="sectionExpansionStatus[0].isExpanded" (onSectionExpandChange)="onSectionExpandChange($event)">
<landlord-list [categorytype]=1 *ngIf="sectionExpansionStatus[0].isExpanded"></landlord-list>
</section>
<section title="Tenants" [isExpanded]="sectionExpansionStatus[1].isExpanded" (onSectionExpandChange)="onSectionExpandChange($event)">
<landlord-list [categorytype]=2 *ngIf="sectionExpansionStatus[1].isExpanded"></landlord-list>
</section>
<section title="Additional Data Field">
<additional-datafields [addlDataFieldCategoryId]="30"></additional-datafields>
</section>
</content>
に文字列として入力を渡すためにどのように私はこのように私のコンポーネントからこの「カテゴリタイプ」にアクセスすることができます。
if (contextObj.categorytype == 1)
{
//write code here
}
私はそれをどのように行うことができますか?コンポーネントからどのようにアクセスできますか?
mmmm contextObj.category.toString()については、変数を2回宣言してstringに変換するよりはるかに簡単です。 – btinoco
@btinoco思い出してくれたことに感謝しますが、その点は宣言ではなく変換を示すことでした – Yaser