Angular: Empty Fiddle
http://angularjs.org/
HTML
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<div ng-controller="MyCtrl">
Hello, {{newStr}}!
</div>
JavaScript
var myApp = angular.module('myApp',[]);
//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});
function MyCtrl($scope) {
$scope.str='<div>zasdasd<span>span content</span><span>more span content</span></div>';
$scope.newStr= $scope.str.replace('<div>','<button>').replace('</div>','</button>')
}