JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.angularjs.org/angular-1.0.1.js"></script>
<div ng-app="">  
  <button ng-click="showme=!showme">SHOW/HIDE</button> 
  <div class="wrapper">
    <p ng-hide="showme">It will appear here!</p>
    <input focus-me="shouldBeOpen" ng-show="showme" type="text" name="s" placeholder="Search..." />
  </div>
  
</div>

CSS

h2, a, p, *:before,h1 {
  font-family: "Helvetica Neue", sans-serif;
  font-weight: 300;
}

p {
 display: block; 
  width: 100%;
  color: #2c3e50;
  clear: both;
}


button {
  border: 0;
  background-color: #3498db;
  color: white;
  border-radius: 4px;
  padding: 5px 10px;
  transition: background-color 0.2s ease-out;
 
 
  cursor: pointer;
}

button:hover {
  background-color: #2980b9;
}
button:active, button:hover {
  outline: none;
}

a {
  color: #2c3e50;
  transition: color 0.2s ease-out;
  /*padding: 5px 10px;*/
  margin-right: 16px;
}

a:hover {
  color: #2ecc71;
}

.wrapper {
  border: 1px dashed #95a5a6;
  height: 56px;
  margin-top: 16px;
  border-radius: 4px;
  position: relative;
  font-size: 12px;
}

.wrapper p {
  line-height: 31px;
}

JavaScript

app.directive('focusMe', ['$timeout', '$parse', function ($timeout, $parse) {
    return {
        //scope: true,   // optionally create a child scope
        link: function (scope, element, attrs) {
            var model = $parse(attrs.focusMe);
            scope.$watch(model, function (value) {
                console.log('value=', value);
                if (value === true) {
                    $timeout(function () {
                        element[0].focus();
                    });
                }
            });
            // to address @blesh's comment, set attribute value to 'false'
            // on blur event:
            element.bind('blur', function () {
                console.log('blur');
                scope.$apply(model.assign(scope, false));
            });
        }
    };
}]);