Track Multiple Beacons with Ionic IBeacon

I have started experimenting with beacons. I successfully created a sample code that works fine with one beacon. Now I want to add multiple beacons so all can be tracked. I followed this link for my sample code (https://ionicallyspeaking.com/2017/01/16/creating-a-beacon-application-with-ionic-2/comment-page-1/#comment-382)
To track multiple beacons I just repeated the region creation and start ranging on region code as follows
// setup a beacon region

            this.region = IBeacon.BeaconRegion('deskBeacon', 'F7826DA6-4FA2-4E98-8024-BC5B71E0893E');
            this.region2 = IBeacon.BeaconRegion('deskBeacon', 'F7826DA6-4FA2-4E98-8024-BC5B71E0893F');

            // start ranging
            IBeacon.startRangingBeaconsInRegion(this.region)
                .then(
                    () => {
                        resolve(true);
                    },
                    error => {
                        console.error('Failed to begin monitoring: ', error);
                        resolve(false);
                    }
                );

                  IBeacon.startRangingBeaconsInRegion(this.region2)
                .then(
                    () => {
                        resolve(true);
                    },
                    error => {
                        console.error('Failed to begin monitoring: ', error);
                        resolve(false);
                    }
                );

The problem is that only the second beacon is detected. What am I doing wrong?

I am not sure what the error in your code i think it’s look cool.We have tried the below way it’s working fine.We are getting the data from db and assigning to ibeacons.it’s working fine.
this.appService.getBeacons()
.subscribe(beacons => {
console.log(beacons);
var i=0;
for(i=0;i<beacons.length;i++){
// setup a beacon region – CHANGE THIS TO YOUR OWN UUID
this.region = this.IBeacon.BeaconRegion(beacons[i].beaconDetailes.beaconId,beacons[i].beaconDetailes.uuid);
this.region.NotifyEntryStateOnDisplay = true;
this.region.NotifyOnEntry = true;
this.region.NotifyOnExit = true;

					// start ranging
					this.IBeacon.startMonitoringForRegion(this.region)
					.then(
						() => {
							resolve(true);
							console.log("monitor for region");
						},
						error => {

							resolve(false);
						}
						);


					this.IBeacon.startRangingBeaconsInRegion(this.region)
					.then(
						() => {
							resolve(true);
						},
						error => {

							resolve(false);
						}
						);
				}
			}
			);

@MShehabi
facing same issue. :confounded:
please refer my issue.