Hi,
I get stuck with this simple case below. In the Match I want to compare Observable Language with shortName as part of langSelection. When replacing the hard-coded string ‘en’ in the first case with the wanted comparison {shortName} the whole thing crashes. What am I doing wrong?
<App Theme="Basic" Background="#aaa">
<JavaScript>
var Observable = require("FuseJS/Observable");
var language = Observable('en');
var langSelection = Observable()
langSelection.add({name:'English',shortName: 'en',});
langSelection.add({name:'Deutsch',shortName: 'de',});
module.exports = {
langSelection: langSelection,
language: language,
};
</JavaScript>
<StackPanel>
<Each Items="{langSelection}">
<StackPanel Orientation="Horizontal" >
<Text Value="language:" />
<Text Value="{language}" />
<Text Value=":shortName:" />
<Text Value="{shortName}" />
<Text Value=":" />
</StackPanel>
<Panel>
<Match Value="{language}">
<Case String="en" > <!-- Replace en with {shortName} will lead to crash. -->
<Text Value="case en" />
</Case>
<Case IsDefault="true" String="default_language" >
<Text Value="Default case" />
</Case>
</Match>
</Panel>
</Each>
</StackPanel>
</App>