JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.11/angular.min.js"></script>
<script src="http://code.angularjs.org/1.3.11/angular-mocks.js"></script>
<div id="app" ng-controller="TestParseController">
<h3 data-ng-click="hide($event)" class="plus">Add</h3>
<div test-content="content" ng-show="hasData" id="innerh"></div>
</div>
JavaScript
console.clear();
var app = angular.module("app", ["ngMockE2E"]);
app.controller('TestParseController', function ($scope, $http) {
$scope.hasData = false;
$scope.hide = function (obj) {
alert("test");
};
$http.get('/client/getConfList').success(function (data) {
$scope.hasData = true;
});
});
app.directive('testContent', function () {
return {
template: "<button data-ng-click='hide($event)'>Click me!</button>"
};
});
// --------------- mock $http requests ----------------------
app.run(function ($httpBackend) {
$httpBackend.whenGET('/client/getConfList').respond([{
id: 1,
text: 'user'
}])
});
angular.bootstrap(document.getElementById("app"), ['app']);