Tutorial JavaScript does not work

It just won’t update the Button text. Neither on emulator or Android phone.

Here’s the code:

<App Theme="Basic" Background="#eeeeeeff">
            var Observable = require('FuseJS/Observable');
            var buttontext = Observable('Button');
            var clickcount = 0;

            function click() {
                buttontext.value = 'Clicks: ' + ++clickcount;

           module.exports = {
                    buttontext : buttontext,
                    click : click
        <StatusBarBackground Dock="Top" />
        <ScrollView ClipToBounds="true">
                <Slider />
                <Button Text="Button"/>
                <Switch Alignment="Left" />

What am I doing wrong? I copied it from the tutorial page…



You are not actually data-binding to your buttontext variable. try <Button Text="{buttontext}" Clicked="{click}"/>

Thank you for the reply.

The Clicked="{click}" part although not here, was on my code.

But I missed the {buttontext} part.