1
'findCharityHome.ts' typescriptクラスに変数 'content'があります。角度2のtypecriptクラスの変数の中に角度2の属性を追加する方法
let content = `
<b>`+header+`</b>
<button style='background-color:#428bca;color:white;padding:5px;'>View Profile</button>
`;
さらに、私は解決策
this.navCtrl.push(myProfilePage)を見つけることができませんでした別のpage.Butに移動するボタンクリックイベント以上に次のコードを追加します。
これはtypescriptですクラスで記述された方法の私の完全なコードです。
addCluster(map){
if(google.maps){
//Convert locations into array of markers
let markers = this.locations.map((location) => {
let marker = new google.maps.Marker({
position: location,
animation: google.maps.Animation.DROP,
});
let header = 'some';
let content = `
<b>`+header+`</b>
<button style='background-color:#428bca;color:white;padding:5px;'>View Profile</button>
`;
this.addInfoWindow(marker, content);
return marker;
});
this.markerCluster = new MarkerClusterer(map, markers,{imagePath: 'assets/m'});
}
}