Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit a784dd6

Browse files
committed
Prefixed the "compile" directive (with DTGE)
In order to futureproof, if other packages/plugins have their own "compile" directive. Renamed to be explicit, this is in contrast to `ng-bind-html-unsafe`.
1 parent 108ebb0 commit a784dd6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Our.Umbraco.DocTypeGridEditor/Web/UI/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.directives.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
angular.module("umbraco.directives").directive("compile", [
1+
angular.module("umbraco.directives").directive("dtgeBindHtmlCompile", [
22

33
"$compile",
44

@@ -7,10 +7,10 @@ angular.module("umbraco.directives").directive("compile", [
77
var directive = {
88
restrict: "A",
99
scope: {
10-
compile: "="
10+
dtgeBindHtmlCompile: "="
1111
},
1212
link: function ($scope, $element, $attrs) {
13-
$scope.$watch(function () { return $scope.compile }, function (newValue, oldValue) {
13+
$scope.$watch(function () { return $scope.dtgeBindHtmlCompile }, function (newValue, oldValue) {
1414
$element.html(newValue);
1515

1616
// Only compile child nodes to avoid starting an infinite loop

src/Our.Umbraco.DocTypeGridEditor/Web/UI/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</div>
99
<div ng-if="preview"
1010
style="text-align: left;"
11-
compile="preview"
11+
dtge-bind-html-compile="preview"
1212
prevent-default>
1313
</div>
1414
</div>

0 commit comments

Comments
 (0)