(function () { 'use strict'; var streamApp = angular.module('streamApp'); streamApp.directive('tagCrudDirective', ['streamService', TagCrudDirective]); function TagCrudDirective(streamService) { return { restrict: 'E', scope: { callback: '=', show: '=', }, templateUrl: '/App/Directives/basicCrudDirective.html?v=6.0.0c', link: function (scope, element, attrs, tabsCtrl) { scope.submitNew = function () { streamService.newTag(scope.toAdd, scope.isTodo, scope.callback); scope.cancelNew(); }; scope.placeholder = "Group Name"; scope.cancelNew = function () { scope.show = false; scope.toAdd = ''; scope.isTodo = 'false'; }; scope.$watch('ngShow', function () { setTimeout(function () { $('#tagname').focus(); }, 100); }); } }; }; })();