refactor tabs directive to use controller as syntax