I'm new to typescript and please help me how to get loginservice inside authenticate function. I have used this keyword to get loginservice but it is not working. And also I'm confused with this keyword in typescript.

```
import { Constants } from '../../core/constants';
    import { loginService } from './login.service';
    import { Component, OnInit } from '@angular/core';
    import { FormsModule }   from '@angular/forms';

    @Component({
      selector: 'app-login',
      templateUrl: './login.component.html',
      styleUrls: ['./login.component.css']
    })

    export class LoginComponent implements OnInit {

      constructor(private loginservice: loginService) { }

      ngOnInit() {

      }

      login = {

        formData: {
          username: '',
          password: '',
        },

        resources:{
          login_logo: Constants.LOGO_LOGIN,
        },

        authenticate() {
          console.log("service called");
          let resultset = loginservice.authenticateUser(this.formData);

        }
      }
    }

```