changed to ng-switch for nested views alternative