Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. this.userService.registerUser(
  2. this.registerData.userName,
  3. () => {
  4. self.registerData.error = false;
  5. self.registerData.message = self.registerData.userName + " has been registered";
  6. self.clearRegisterData();
  7. })
  8. }
  9.  
  10. registerUser = (
  11. userName: string,
  12. successCallback) => { // << What's the type of successCallback ????????
  13.  
  14. this.$http({
  15. method: 'POST',
  16. url: "/api/Account/Register",
  17. data: {
  18. userName: userName,
  19. firstName: firstName,
  20. lastName: lastName,
  21. email: email,
  22. password: password,
  23. confirmPassword: confirmPassword
  24. }
  25. })
  26. .success((data) => {
  27. if (typeof successCallback === 'function') {
  28. successCallback(data);
  29. }
  30. });
  31. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement