Files
standardnotes-app-web/app/assets/javascripts/app/services/directives/snippet.js
Mo Bitar 6a2e3e9ec1 es6
2016-12-15 12:52:34 -06:00

18 lines
496 B
JavaScript

angular
.module('app.frontend')
.directive('note', function($timeout) {
return {
restrict: 'E',
controller: 'SingleNoteCtrl',
templateUrl: "frontend/directives/note.html",
scope: {
note: "="
},
}
})
.controller('SingleNoteCtrl', function ($rootScope, $scope, $state, markdownRenderer) {
$scope.renderedContent = function() {
return markdownRenderer.renderHtml(markdownRenderer.renderedContentForText($scope.note.text));
}
});