Angular: Empty Fiddle

http://angularjs.org/

by ItsLeeOwen

HTML

<script src="http://code.angularjs.org/angular-1.0.0rc5.js"></script>
<div ng-controller="MyParent">
    <my-child relationship="your Dietitian"></my-child>
</div>

JavaScript

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

myApp.directive('myChild', function() {
    return {
        restrict: 'E',
        replace: true,
        template: '<div>{{ parentMsg }} {{ relationship }}.</div>',
        scope: {
            relationship:'attribute'
        },
    }
});


function MyParent($scope) {
    $scope.parentMsg = 'Luke, I am ';
    $scope.relationship = 'your Father';
}