Files
Archetype/app/directives/archetypecustomview.js
T
Kevin Giszewski 0dedd7fb2d Fix for #160
2014-06-25 10:28:30 -04:00

22 lines
576 B
JavaScript

angular.module("umbraco.directives").directive('archetypeCustomView', function ($compile, $http) {
var linker = function (scope, element, attrs) {
var view = "/App_plugins/Archetype/views/archetype.default.html";
if(scope.model.config.customViewPath) {
view = config.customViewPath;
}
$http.get(view).then(function(data) {
element.html(data.data).show();
$compile(element.contents())(scope);
});
}
return {
restrict: "A",
replace: true,
link: linker
}
});