angular2 template - Angular 2: If value exists show html -
at moment have service pulls values number of apis have written. in template wish output following html if value exists or not empty in results when fed template:
<li class="title rh-blue-lite-fg">{{ project.meta_header_one }}</li>
so trying figure out how wrap in ngif or there other way 'li' item gets output if value present , not empty
i think can use ngif directive check if project isn't null:
<li class="title rh-blue-lite-fg" *ngif="project.meta_header_one">{{ project.meta_header_one }}</li>
reference: https://angular.io/docs/ts/latest/api/common/index/ngif-directive.html
Comments
Post a Comment