Hi SO my experience with angularJS is fairly lackluster, I've tried reading the documentation and searched around without a lot of results. I am tasked with maintaining a legacy angularJS app that utilizes angularJS 1.4.x, grunt and typescript.
I have a directive for populating and handling a Yes-No select list, this select list is marked with the attribute kendo-drop-down-list
I have a need to forward attributes from this directive to the select element due to the way validation works in this project.
This is my usage of the Yes-No dropdown
<yes-no-drop-down ..scopedattributes...
data-validationRule1-msg="This is rule 1 that failed"
data-validationRule2-msg="This is rule 2 that failed"
/>
Inside the yes-no-drop-down directive the scope specify the scopedattributes
scope: IYesNoDropDownControllerScope = {
selectedoption: "=",
disabled: "=?",
name: "@",
}
The template for the dropdown is the following
<select kendo-drop-down-list
... k-xx attributes for kendo ...
name="{{vm.name}}"
>
</select>
My issue is that the attribute data-validationRuleXYZ-msg
is variable depending on the validation rule(s) that runs. and I need to forward theese attributes to the select. so I end up with this result
<select kendo-drop-down-list
name="TestYesNoDropdown"
data-validationRule1-msg="This is rule 1 that failed"
data-validationRule2-msg="This is rule 2 that failed"
>
</select>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…