Commit 9fbacb17e3d4e1a82ee2f51c1643d8ca6a043af4
1 parent
7b129225
Affichage du Markdown dans les messages
Fix #3
Showing
4 changed files
with
7 additions
and
4 deletions
Show diff stats
bower.json
public/js/controllers/ForumConvCtrl.js
1 | -angular.module('ForumConvCtrl', ['SessionsServ', 'ApiServ']) | |
1 | +angular.module('ForumConvCtrl', ['SessionsServ', 'ApiServ', 'ngSanitize', 'btford.markdown']) | |
2 | 2 | .controller('ForumConvCtrl', function ($scope, $routeParams, SessionServ, ApiServ) { |
3 | 3 | $scope.messs = []; |
4 | 4 | $scope.conv = {}; | ... | ... |
public/views/forumConv.html
... | ... | @@ -12,8 +12,7 @@ |
12 | 12 | <span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Supprimer |
13 | 13 | </button> |
14 | 14 | </div> |
15 | - <div class="panel-body"> | |
16 | - {{ mess.content }} | |
15 | + <div class="panel-body" btf-markdown="mess.content"> | |
17 | 16 | </div> |
18 | 17 | </div> |
19 | 18 | <div class="form-group" ng-if="session.canAddMess"> | ... | ... |
public/views/index.html
... | ... | @@ -19,6 +19,9 @@ |
19 | 19 | <script src="libs/ladda/js/spin.js"></script> |
20 | 20 | <script src="libs/ladda/js/ladda.js"></script> |
21 | 21 | <script src="libs/angular-ladda/dist/angular-ladda.min.js"></script> |
22 | + <script src="libs/angular-sanitize/angular-sanitize.min.js"></script> | |
23 | + <script src="libs/showdown/compressed/Showdown.min.js"></script> | |
24 | + <script src="libs/angular-markdown-directive/markdown.js"></script> | |
22 | 25 | <script src="libs/ng-sortable/dist/ng-sortable.min.js"></script> |
23 | 26 | <script src="js/services/NotifyServ.js"></script> |
24 | 27 | <script src="js/services/ApiServ.js"></script> | ... | ... |