Skip to content

Text on the Dropdown-Button isn't updating  #137

Closed
@MrWook

Description

@MrWook
<ol class="nya-bs-select" ng-model="model.items" >
     <li nya-bs-option="option in selected.item"  deep-watch="true">
        <a>
             {{option.name | translate}}
        </a>
     </li>
</ol>

As you can see I'm using a filter called "translate" on the labels in the dropdown and the label on the button. The filter translate a marker into the right translation for example, "ITEM_PAPER" into "Paper", when the language is set to english.
When I'm loading the page everything works fine but when I'm change the language for the site, only the items in the dropdown change not the button label.
And as you can see i tried it with "deep-watch=true" but this doesnt work neither.

My object looks something like that:
$scope. selected.item = [ { "value": "1", "name": "ITEM_PAPER" }, { "value": "2", "name": "ITEM_CLOCK" }, { "value": "3", "name": "ITEM_PEN" } ]

The model looks like this:
$scope.model.language = 1;

My Global config looks like this:
$scope.translate_config={ maxItems: 1, valueField: 'value', labelField: 'name', searchField: ['name'] };

For my regret i can't provide you with a working plunker or fiddle because the whole application with the translation thing is just to big and time consuming to bring it into a plunker or fiddle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions