JSFiddle - React, Tailwind, and code Playground
by KevinIsNowOnline
HTML
<script src="http://searls.github.com/jasmine-all/jasmine-all-min.js"></script>
<script src="http://code.angularjs.org/1.0.7/angular-mocks.js"></script>
<div ng-app="app">
<div class="dumb-search"> </div>
</div>
JavaScript
angular.module('app', [])
.directive('dumbSearch', function(){
return {
replace:true,
restrict: 'C',
scope: {
},
template: '<h2><input type="text"/></h2>',
controller: function($scope){
$scope.visibleFlag = true;
},
link: function(scope, element, attrs, controller){
// var $elem = element.find('input');
// $elem.bind('click', function(){
// debugger;
// scope.visibleFlag = !scope.visibleFlag;
// });
}
}
});
describe('foo', function() {
beforeEach(module('app'))
it('test', inject(function($compile, $rootScope) {
var scope = $rootScope.$new();
var element = $compile('<div class="dumb-search" visible="true"> </div>')(scope);
element.scope().$apply();
debugger;
}));
});