This is a simple example of an Aurelia component.
5 | 6 |Current count: ${currentCount}
7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | csharp_new_line_before_open_brace = none 3 | indent_style = tab 4 | indent_size = 4 5 | 6 | [*.{ts,js}] 7 | indent_style = tab 8 | indent_size = 4 9 | 10 | [**.json] 11 | indent_style = tab 12 | indent_size = 2 13 | 14 | [**.{html,xml,csproj}] 15 | indent_style = tab 16 | indent_size = 2 17 | 18 | [**.scss] 19 | indent_style = tab 20 | indent_size = 2 21 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "stable" 4 | 5 | sudo: false 6 | 7 | notifications: 8 | email: false 9 | 10 | cache: 11 | directories: 12 | - node_modules 13 | 14 | branches: 15 | only: 16 | - master 17 | 18 | install: 19 | - npm install 20 | 21 | before_script: 22 | - export CHROME_BIN=chromium-browser 23 | - export DISPLAY=:99.0 24 | - sh -e /etc/init.d/xvfb start 25 | 26 | script: 27 | - npm run lint 28 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "es2015", 4 | "moduleResolution": "node", 5 | "target": "es5", 6 | "sourceMap": true, 7 | "experimentalDecorators": true, 8 | "emitDecoratorMetadata": true, 9 | "skipDefaultLibCheck": true, 10 | "strict": false, 11 | "lib": [ "es2015", "dom" ], 12 | "types": [ ] 13 | }, 14 | "exclude": [ "bin", "node_modules" ], 15 | "atom": { "rewriteTsconfig": false } 16 | } 17 | -------------------------------------------------------------------------------- /ClientApp/app/components/fetchdata/fetchdata.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from "aurelia-fetch-client"; 2 | import { inject } from "aurelia-framework"; 3 | 4 | @inject(HttpClient) 5 | export class Fetchdata { 6 | constructor(private http: HttpClient) { } 7 | 8 | forecasts: IWeatherForecast[]; 9 | 10 | async activate() { 11 | this.forecasts = await this.http.fetch("api/SampleData/WeatherForecasts").then(result => result.json() as PromiseThis component demonstrates fetching data from the server.
5 | 6 |Loading...
7 | 8 || Date | 12 |Temp. (C) | 13 |Temp. (F) | 14 |Summary | 15 |
|---|---|---|---|
| ${ forecast.dateFormatted } | 20 |${ forecast.temperatureC } | 21 |${ forecast.temperatureF } | 22 |${ forecast.summary } | 23 |
Welcome to your new single-page application, built with:
4 |To help you get started, we've also set up:
11 |npm run webpack:watch in background when working with the UI code. This way any changes to C# code won't trigger a full webpack rebuild.webpack build tool produces minified static CSS and JavaScript files.