for some reason my input type= "submit" is not working (it's only working for the 1st time). I wrote the input in a custom-control. Will that be a problem? Help is much appreciated. Thanks. Here is my code.
page.zoom = 4;
page.btn_Click = function() {
if (page.MobileNo) {
$http.get(serviceBasePath + '/api/Map/GetDeviceLocation?MobileNo=' + page.MobileNo).then(function(response) {
var deviceindex = page.DeviceData.findIndex(x => x.DeviceId== response.data.DeviceId);
if (deviceindex == -1) {
page.DeviceData.push(response.data);
page.zoom = 14;
page.center = response.data.Location.position;
} else {
page.zoom = 14;
page.center = response.data.Location.position;
}
}, function(error) {})
}
}
<custom-control style="padding-left:10px; padding-top:10px" position="TOP_LEFT" index="2" on-click="page.btn_Click()">
<input type="submit" class="form-control" value="GO">
</custom-control>