Angular:

http://angularjs.org/

by Danny Michaelis

HTML

<div ng-controller="MyCtrl">
  <div ng-my-directive="obj.myscopevalue"></div>
    myscopevalue = {{obj.myscopevalue}}
</div>

JavaScript

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

app.directive('ngMyDirective', function ($parse) {
    return function(scope, element, attrs) {
        var model = $parse(attrs.ngMyDirective);
        console.log(model(scope));
        model.assign(scope,'Anton');
        console.log(model(scope));
    }
});

function MyCtrl($scope) {
    $scope.obj = { myscopevalue: 'Superhero'};
}