From: Alexandre Terrasa Date: Wed, 1 Jun 2016 00:32:42 +0000 (-0400) Subject: nitweb/angular: introduce entity-location directive X-Git-Url: http://nitlanguage.org nitweb/angular: introduce entity-location directive Signed-off-by: Alexandre Terrasa --- 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' + }; + }) })();