You are missing the .bind value in your selection options. I prefer to use mode.bind instead of value.bind. Try something like this:
<template> <select value.bind="changedValue" change.delegate="DropdownChanged(changedValue)"> <option model.bind="1">1</option> <option model.bind="2">2</option> <option model.bind="3">3</option> <option model.bind="4">4</option> </select> </template> export class App { changedValue; DropdownChanged(changedVal) { alert(changedVal); } }
I'm not sure what you are trying to bind to a selection, but basically you want to create a variable that you can also bind to the selected value. Thus, the selected value will be set to the variable changedValue . I like to use model.bind because I can bind true / false values ββinstead of everything that is a string.
I made a running Gist for you if needed: https://gist.run/?id=87f6897928feb504dad638d439caf92f
James source share