Hi~
i will make articleunitCombo.cshtml and js (permissionCombo.cshtml and js )
articleUnitService.getArticleUnits({}).then(function (result) {
angular.forEach(result.data.items,
function (item) {
<ins>**item.displayName = (Array(item.level+1).join("--")) + ' ' + item.displayName;**</ins>
});
$scope.articleunits = result.data.items;
//refresh combo
$timeout(function () {
$(element).selectpicker('refresh');
});
});
item.level+1 code is error (+1)
My article unit has the same organizationalUnit and data table structure.
and
how to select box value set (articleunit.id)
5 Answer(s)
-
0
Hi,
You can directly use id property in articleunitCombo.cshtml. Does output dto for getArticleUnits contains a property named level ?
Thanks.
-
0
Ok..thanks..
but,
cshtml <articleunit-combo selected-articleunit="vm.requestParams.articleunit"></articleunit-combo>
angular alert(vm.requestParams.articleunit);
is null or empty
how to get value or text?
-
0
Hi,
You can define your directive like this one <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Web/App/common/directives/roleCombo.cshtml">https://github.com/aspnetzero/aspnet-ze ... mbo.cshtml</a> <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Web/App/common/directives/roleCombo.js">https://github.com/aspnetzero/aspnet-ze ... leCombo.js</a>
It is simple and easy to copy.
Thanks.
-
0
oops.....
I already understand the directives and I have the source code as well.
Despite understanding and writing code
It does not get value or text value.
-
0
Hi,
Can you send your project to <a href="mailto:[email protected]">[email protected]</a> ? It will be easier and faster to solve it in that way :).
Thanks.