Created
September 16, 2017 10:10
Star
You must be signed in to star a gist
Aurelia code quality - part 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {inject} from 'aurelia-framework'; | |
import {GreeterService} from './services/greeter-service.js'; | |
@inject(GreeterService) | |
export class Greeter{ | |
constructor(greeterService){ | |
this.greeterService = greeterService; | |
} | |
attached(){ //called when the greeter component is attached to the DOM | |
this.greetings = this.greeterService.loadGreetings(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment