console.log Angular directive scope outputs “[object Object] No Properties”

The + operator calls to the toString method of the object which would return ‘[object object]’

So using log like this:

console.log('scope is ' + scope);

Produced the string scope is [object object]

Instead use the console.log() method with commas (as commented below) to be able to drill into the scope object:

console.log('scope is', scope)

Leave a Comment