Guest User

Untitled

a guest
Apr 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import { Injectable } from '@angular/core';
  2.  
  3. @Injectable()
  4. export class LoginService {
  5.  
  6. constructor() { }
  7.  
  8.  
  9. auth(user: string, password: string): boolean {
  10.  
  11. if (user == 'dotnet' && password == 'SP') {
  12. localStorage.setItem('token', '.NET_SP');
  13. return true;
  14. } else {
  15. return false;
  16. }
  17.  
  18. }
  19.  
  20. }
Add Comment
Please, Sign In to add comment