Can anyone assist me with setting up a directive and printing its scope? I am encountering an error.
//module declaration
var app = angular.module('myApp',[]);
//controller declaration
app.controller(function($scope){
$scope.name = "Joseph";
});
//app declaration
app.directive('myStudent',function(){
return{
template: "Hi! Dear!! {{name}}"
}
});
<body ng-app="myApp" ng-controller="myCtrl">
<my-student></my-student>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.5/angular.min.js"></script>
</body>