Created
June 30, 2016 12:29
-
-
Save motion-work/058ab3420e99588801b5b22997f89e3f to your computer and use it in GitHub Desktop.
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 {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