<div class="umb-editor umb-checkboxlist" ng-controller="similarity.indexController">
<div>
<select ng-model="model.config.index" class="umb-editor umb-dropdown" ng-options="o for o in indexes">
</select>
</div>
and my controller looks like
angular.module("umbraco").controller("similarity.indexController",
function ($scope, indexResource) {
//get the indexes from /umbraco/backoffice/api/SimilarityApi/GetIndexes
indexResource.getAllIndexes().then(function(response){
$scope.indexes= response.data;
})
});
The prevalue stuff all loads fine my drop down is populated and I can select a value however when I save it does save however it does not restore the picked value. I am missing something obvious, any ideas?
Yeah just handle it as a prop editor, it's the config options on a prop editor that define the key but the prevalue editor doesn't need to know about the key it's just storing a value
Prevalue save issue
I am having a save issue with my property editor prevalue. I have the following prevalue:
My view looks like
and my controller looks like
The prevalue stuff all loads fine my drop down is populated and I can select a value however when I save it does save however it does not restore the picked value. I am missing something obvious, any ideas?
Regards
Ismail
Comment author was deleted
prevalue editor doesn't know about model.config , you use that in the prop editor to access the value
Comment author was deleted
damn formatting
Tim,
Even if you have more than one custom prevalue? Does angular know model.value is only for that specfic prevalue type? I am assuming it is.
Regards
Ismail
Comment author was deleted
So see it as a prop editor first it's just storing a value, if you then use it as a prevalue editor you can fetch the value with the key
Comment author was deleted
Yeah just handle it as a prop editor, it's the config options on a prop editor that define the key but the prevalue editor doesn't need to know about the key it's just storing a value
Tim,
So for each prevalue editor i can have
model.value.somevalue1 //works on my dropdown
model.value.somevalue2 //does not work on my multiselect
etc etc
Regards
Ismail
The view for the multi select controller looks like
Comment author was deleted
why do model.value.docTypes ?
Comment author was deleted
AS a tip, try to make it work as a prop editor first, then use it as a prevalue editor
is working on a reply...