Following is html snippet element
This error message...
invalid or illegal selector was specified
...implies that the Locator Strategy you have constructed was not a valid locator.
To locate the element with text as Tile View you can use the following xpath :
"//a[@ng-click=\"nodes.setViewType('tiles',true)\"]"
Note : As the element is an Angular element to interact with it you have to induce a waiter for the element to be clickable.