Skip to content

Instantly share code, notes, and snippets.

@motion-work
Created June 30, 2016 12:29
Show Gist options
  • Save motion-work/058ab3420e99588801b5b22997f89e3f to your computer and use it in GitHub Desktop.
Save motion-work/058ab3420e99588801b5b22997f89e3f to your computer and use it in GitHub Desktop.
import {Controller, State, Inject, Init} from "../utils/Decorators"
@State({
name: "member.home",
as: "homeCtrl",
url: "/",
templateUrl: "/views/home.html",
pageTitle: "Home"
})
export class HomeController {
/**
* @type {UserService}
*/
@Inject UserService;
/**
* @type {AuthService}
*/
@Inject AuthService;
/**
* @type {$state}
*/
@Inject $state;
users = [];
spinner = false;
/**
* Get all users
* */
@Init
async getUsers() {
this.spinner = true;
this.users = await this.UserService.index();
this.spinner = false;
}
timeChanged(start, end) {
console.log(start);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment