weather.ts file
import {bindable} from 'aurelia-framework';
export class Weather {
cityName: string = 'Hilsinki';
constructor() {
this.cityName = 'Hilsinki';
}
}
weather.html file
<template>
City XName: ${cityName}
</template>
When I print a component in any file, the cityName variable is not printed. I have been trying this for the last three days, 12 hours a day.
Any help is appreciated
UPDATE:
Using a component in welcome.html
<template>
<require from = "./components/weather.html"></require>
<weather view-model="Weather"></weather>
</template>
also imported the component in welcome.ts as
import { Weather } from './components/weather';
source
share