I have an angular class:
@Component({
selector: 'main-title',
styleUrls: ['main_title.scss'],
template: `
<ng-template>
<div class="main-title">
<h2 [ngClass]="{'-small': isSmall }"
class="{{titleClassName}}" data-cy="main-title">{{title}}</h2>
</div>
</ng-template>
`,
})
export class MainTitle extends NoRootTagComponent {
/**
* Accepts strings or array (will map to multiple lines)
*/
@Input('title')
title: string
@Input('titleClassName')
titleClassName = ''
@Input()
isSmall?: boolean
constructor(vcRef: ViewContainerRef, public router: AsyncRouter) {
super(vcRef)
}
}
and using it like this:
<main-title
[isSmall]="true"
titleClassName="h5"
title="please verify your zip code."></main-title>
However I don't see the boolean is isSmall
being passed. It remains undefined
for some reason. Is it because of the NoRootTagComponent
? I can't figure out why this is happening.