Here is an HTML snippet element:
<a ng-click="nodes.setViewType('tiles',true)">
<span class="fa fa-check Tick-Inactive" ng-class="nodes.viewType == 'tiles'? 'Tick-Active':'Tick-Inactive'" style=""></span>
Tile View
</a>
Attempting to use ng-click or ng-class in locators with JavaScript escape characters, but receiving an error message stating "invalid or illegal selector was specified".
element(by.xpath("//a[contains(@ng-click,'nodes.setViewType(\'tiles\',true)')]"));
element(by.css("span[ng-class^=nodes.viewType == \'tiles\']"));
element(by.xpath("//a[contains(@ng-click,'nodes.setViewType%28%27tiles%27%2Ctrue%29')]"));