Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $http.get('/paste/' + $scope.paste).success(getCallback);
- var getCallback = function(data) {
- setTimeout(function() {
- $scope.paste = data[0].code;
- $scope.$apply();
- }, 0);
- };
- app.filter('pretty', function() {
- return function(text) {
- // a method in the prettify.js
- return prettyPrintOne(text, '', true);
- };
- });
- <pre ng-bind-html="paste|pretty"></pre>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement