taiga-front/app/modules/profile/profile-contacts/profile-contacts.controller...

23 lines
588 B
CoffeeScript

class ProfileContactsController
@.$inject = [
"tgUserService",
"tgCurrentUserService"
]
constructor: (@userService, @currentUserService) ->
loadContacts: () ->
@.currentUser = @currentUserService.getUser()
@.isCurrentUser = false
if @.currentUser.get("id") == @.user.get("id")
@.isCurrentUser = true
@userService.getContacts(@.user.get("id"))
.then (contacts) =>
@.contacts = contacts
angular.module("taigaProfile")
.controller("ProfileContacts", ProfileContactsController)