Using default parameter problem

I assign a default value to the function parameter and I cannnot run Ionic app on iOS.

like this:
fn: function(param1 = 1) { …}
or
function fn(param1 = 1) { … }

It works well with ‘ionic serve’ but not with emulator nor real device.

My app shows splash screen only.

After removing default parameters, app runs well.

Is not able to use default parameters?

why are you not using something like this:

function (param1) {
    params1 = !params1 && params1 !== 0 ? 1 : param1; (if param1 not set and is not 0 --> set it to default value else --> param1
    ....
}

you could try this too :

function fn (param1){
var myParam = param1 || defaultValue;
//creates a new variable param with either param1 as value or, if param1 is undefined, defaultValue
}