Angular: Empty Fiddle

http://angularjs.org/

by geoctrl

HTML

<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<div ng-controller="MyCtrl">
  Hello, {{name}}!
</div>

<div default-header></div>

JavaScript

var myApp = angular.module('myApp',[]);

//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});

function MyCtrl($scope) {
    $scope.name = 'Superhero';
}

myApp.directive('defaultHeader', function() {

	    var defaultHeaderCtrl = function($scope, $element) {

		    var containEl,
			   	elHeight = 500;

        this.isCool = function() {
          console.log('this is cool')
        }
        
				console.log(this) // returns 'undefined'    
	    	
        function resizeElement(el, height) {
		    	el[0].style.height = `${height}px`
		    }

	    };

	    return {
	    	restrict: 'A',
		    scope: {
	    		coverImgUrl: '='
		    },
		    controller: defaultHeaderCtrl
	    };
    });