Below is the html code:
<tab id="briefcase" ng-controller="BriefcaseController as vm" active="main.uiState.briefcaseOpen">
<tab-heading>
<i class="glyphicon glyphicon-briefcase"></i><br>
My Court Cases <span id="briefcaseCount" ng-show="main.briefcase.contents.length" class="badge">{{main.briefcase.contents.length}}</span>
</tab-heading>
<ng-include src="'app/components/briefcase/briefcase.html'"></ng-include>
</tab>
I followed the example given in protractor API: view:
<span id="foo">{{variableInScope}}</span>
code:
var value = element(by.id('foo')).evaluate('variableInScope');
in my case since I have 2 instances with same expression, I did the following:
var value = element.all(by.id('briefcaseCount')).get(0).evaluate('main.briefcase.contents.length');
When I call console.log(value)
.. I am getting [object, Object]
Any help is appreciated.