AngularJS ESRI Javascript Legend - control layer visibility