I attempted to use an angular expression to determine if a scope variable is an array. However, when using variable.constructor === Array
for the check, the result always showed as false
.
It was only when I used a scope function with
return variable.constructor === Array
that I received the correct result.
Could someone explain why the expression behaves this way? Also, is there a way to perform the same check as an inline expression statement?
You can see a Plunker showcasing the issue here
Thank you.