Goal of my app is to create property editor. From server i got list of properties and it's types:
$scope.properties = [
{name: 'property1', type: 'integer', 'value': 123},
{name: 'property2', type: 'bool', 'value': 123},
{name: 'property3', type: 'string', 'value': 123},
{name: 'property4', type: 'custom', 'value': 123},
];
Using this data i want to create html list like this. This part is not working. How to change it?
<ul>
<li ng-repeat="property in properties">
<div property-editor-{{property.name}} my-data="property"></div>
</li>
</ul>
Then i can easily implement directives with it's custom controllers like this
angular.module('PropertyEditor').directive('propertyEditorCustom', function() {
return {restrict: 'A',controller:function(){...}};
})
PS: I want to avoid a centralized switch, because new modules can add it's custom types.