Using an angular expression, I tried to show if a scope variable is an array.
I tried to use variable.constructor === Array
for checking the same, but in expression always showing false
as result.
When I used a scope function to return variable.constructor === Array
, I got the correct result.
Can someone tell, why expression behaves in this manner. Also, how same check can be done as an inline expression statement.
Checkout the Plunker demonstrating same problem, here
Thanks.