I currently have the following expression in ng-class, in the view of an AngularUI Bootstrap modal:
<div class="modal-body mdl-body"
ng-class="{ 'is-msg': vm.message.type == 'msg',
'height-limit': vm.message.hasHeight }">
But I also want to pass an array of custom classes, like this:
ng-class="vm.message.classes"
This is where the modal is called in controller:
modalService.open({
type: "okay",
title: "Terms & Conditions",
content: $scope.APISettingData.signup_term_and_condition,
classes: ["h-md", "text-info"],
isHtml: true,
hasHeight: true
});
Both ways works without each other but they didn't work when I tried to combine them.
Is it possible to do this? Please advise me some ideas and solutions.
ng-classis rather simple directive, you can always make your own, that does exactly what you want. Accepts arrays or whatever.