There is an array with my attributes and I am trying to choose a certain load on the load.
Each feature has an array of object objects, objects and attributes. I want to select the attribute value with
I selected = true
I / {{"attribute": {"edit": {"id": 56, {"Id": 5, "typeName": "list"}, "attribute value": ["name": "helium", "type-edit": 5, "viewtuusers": true}, "type" 56, "value": 56, "value": 56, "value": "legius", "selected": true}, {"id": 110, "attribute ID": 56, "value": "Dakoke "," Selected ": incorrect}]," value text ": zero}]} $ $ scope.changeValue = function change value (attribute, value) {warning (JSON.stringify ({" attributeID ": attribute.attribute.id , "Type": Attribut E.type.typeName, "value": value.id}));};}); Here is my HTML code: I only want to create a function to search the selected value as a true. After finding that value, I set the radius model as the property value. Then I called that ceremony immediately afterwards. The complete plunker is:
& lt; Div ng-repeat = "profile data in attribute" & gt; & Lt; Ng-change = "changeValue (attribute, attributeValue)" ng-option = "attribute.attributeValues" item in the form of item.value as item.id "ng-model =" attributeValue.id "> gt; & Lt; / Select & gt; & Lt; / Div & gt;
$ scope.selectChosen = function selectChosen () {var attrVals = $ scope.profile data. Features [0] .attributeValues; For (var i = 0; i & lt; attrVals.length; i ++) {if (attribute [i] .chosen) {$ scope.attributeValue = attrvals [i]; break; }}}; $ Scope.selectChosen ();
No comments:
Post a Comment