From 2ed47ec5b3352a07715acf9c805d00a159402c8c Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Tue, 31 May 2016 20:32:42 -0400 Subject: [PATCH 1/1] nitweb/angular: introduce entity-location directive Signed-off-by: Alexandre Terrasa --- share/nitweb/directives/entity/location.html | 5 +++++ share/nitweb/javascripts/entities.js | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 share/nitweb/directives/entity/location.html diff --git a/share/nitweb/directives/entity/location.html b/share/nitweb/directives/entity/location.html new file mode 100644 index 0000000..7e817c6 --- /dev/null +++ b/share/nitweb/directives/entity/location.html @@ -0,0 +1,5 @@ + + {{mentity.location.file}} + :{{mentity.location.line_start}} + + diff --git a/share/nitweb/javascripts/entities.js b/share/nitweb/javascripts/entities.js index 2fd481c..c689277 100644 --- a/share/nitweb/javascripts/entities.js +++ b/share/nitweb/javascripts/entities.js @@ -67,4 +67,14 @@ templateUrl: '/directives/entity/tag.html' }; }) + + .directive('entityLocation', function() { + return { + restrict: 'E', + scope: { + mentity: '=' + }, + templateUrl: '/directives/entity/location.html' + }; + }) })(); -- 1.7.9.5