Angular: Empty Fiddle
http://angularjs.org/
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.min.js"></script>
<input ng-init="customTag='u'" type="text" ng-model="customTag" placeholder="Enter a name here" ng-change="update()"/>
<span render="{{customTag}}">77</span>
JavaScript
var myApp = angular.module('myApp',[]);
myApp.directive('render', function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
attrs.$observe('render', function(value) {
if (value) {
element.html('<' + value + '>77</' + value + '>');
} else {
element.html(77);
}
});
}
};
});