AngularJS isolated scope
by dekkard
HTML
<div ng-app="helloHabrahabr">
<div ng-controller="forExampleController">
Interpolated: {{hello}}<br/>
Directive: <span habra-habr></span>
</div>
</div>
JavaScript
function forExampleController($scope){
$scope.hello="Hello Habr!";
}
angular.module('helloHabrahabr', [])
.directive('habraHabr', function() {
return {
template:"<input ng-model='hello'>{{hello}}",
scope:{
}
}
});