Listing available element types in block editor settings

This commit is contained in:
Callum Whyte
2019-05-19 13:08:07 +01:00
parent 202302e003
commit e7303602d2
2 changed files with 15 additions and 1 deletions
@@ -1,8 +1,16 @@
angular.module("umbraco")
.controller("Umbraco.PropertyEditors.BlockEditor.SettingsController", [
"$scope",
function ($scope) {
"contentTypeResource",
function ($scope, contentTypeResource) {
$scope.model.value = [];
$scope.elementTypes = [];
contentTypeResource.getAll()
.then(function (data) {
$scope.elementTypes = _.where(data, { isElement: true });
});
}
]
);
@@ -2,4 +2,10 @@
<pre>
{{model.value | json}}
</pre>
<ul>
<li ng-repeat="elementType in elementTypes">
{{elementType.name}}
</li>
</ul>
</div>