Ionic login form in login 3

import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
import { Http, Headers, RequestOptions } from ‘@angular/http’;

@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {

constructor(public http: Http) {

}

public login() {

var headers = new Headers();
headers.append("Accept", 'application/json');
headers.append('Content-Type', 'application/json' );
let options = new RequestOptions({ headers: headers });

let postParams = {

  UserName:"",
  Password:""
  
}

this.http.post("API_URL", postParams, options)
  .subscribe(data => {
    console.log(data['_body']);
   }, error => {
    console.log(error);// Error getting the data
  });

}

}

I want to declare a parameters dynamically can you any one help me. In this code i have successfully assign with api. But i want to declare the Parameters Dynamically