How Can i use *ngIf inside google Maps InfoWindow so that i can hide or show a Div based on a button i click in InfoWindow?
This is my Current Code:
let infowindow = new google.maps.InfoWindow({
content: '<div id="iw-container" *ngIf="showList">'+
'<div class="alert-box">Regd: ' +Data[i].foo.registration+'</div>'+
'<div class="alert-box" *ngIf="showList">Phone: ' +Data[i].foo.id.phoneNumbers[0]+'</div>'+
'<div *ngIf="showList">Hi</div>'+
'<button class=List">View List</button>'+
'</div>'
});
self.marker[reg].infowindow = infowindow;
function to change the flag which i've declared after the above line:
$('.List').click(function(){
self.showList = !self.showList;
self.showDataList(i);
});
showDataList() will give some data which i want to handle later.
*ngIf works only once and later it just fails.
I have multiple markers which i'm storing in marker[].
What am I doing wrong ?
Thanks in Advance