I am wanting to concat an indeterminate amount of string arguments with a specified delimiter, so I Google'd the issue and came across a page on Mozilla's website instructing on how to do just that using the arguments object.
function myConcat(separator) {
var args = Array.prototype.slice.call(arguments, 1);
return args.every(x => x === '') ? '' : args.join(separator);
}
When I tried this in a normal JS compiler such as repl.it, it worked perfectly! I couldn't be happier to have it proven, tried and tested.
However, when plugging the code into my Angular 6 app, I get the usual error stating that when calling the function, I am passing in too many arguments and that it only expects the one.
Is there anything I can do to get this working in Angular 6?