angular - then is not a valid attribute name in Angular4 -


in angular 4 using below html code

<div *ngif="s.flow";then avail else notavail></div> <ng-template #avail><td>{{s.flow.oo_status.status_info}}</td></ng-template> <ng-template #notavail><td>will update</td></ng-template> 

and getting below error

domexception {message: "failed execute 'setattribute' on 'element': ';then' not valid attribute name.", name: "invalidcharactererror", code: 5, stack: "error: failed execute 'setattribute' on 'elemen…10.144.100.162:3000/polyfills.bundle.js:16036:38)", ngdebugcontext: debugcontext_…} 

<div *ngif="s.flow;then avail else notavail"></div> <ng-template #avail><td>{{s.flow.oo_status.status_info}}</td></ng-template> <ng-template #notavail><td>will update</td></ng-template> 

it should *ngif="s.flow;then avail else notavail" instead of *ngif="s.flow;"then avail else notavail


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -