I am trying to make a simple scan view for testing using a trunk. I started with events, but no one shoots. What for? I have already done other things with the spine, such as routing, etc. No problem. Thank you for your time. My definition of the trunk system - -> this source <-
module Views {
export class MenuView extends Backbone.View {
constructor(viewOptions?: Backbone.ViewOptions) {
super(viewOptions);
}
el = document.body;
events = {
"click #Btn-Start": "navigate",
"click #Btn-Software": "navigate",
"click #Btn-Anderes": "navigate",
"click #Btn-Impressum": "navigate"
};
initialize() {
console.log("initialize");
}
render() {
console.log("render");
}
navigate() {
console.log("navigate");
}
}
}
<body>
<div id="Menu">
<div id="Btn-Start"></div>
<div id="Btn-Software"></div>
<div id="Btn-Anderes"></div>
<div id="Btn-Impressum"></div>
</div>
<body>
EDIT: Tried routes with a route (name: string, callback: function) and routes as an object. It seems to work with a function reference, but not like a string in a routes object. Perhaps there is a way to declare it in this form.
source
share