angular2 show/hide on click

Simple tip how to show/hide on click

import {Component, OnInit, ElementRef} from '@angular/core';

@Component({
    selector: 'app-lp',
    templateUrl: './lp.component.html',
    styleUrls: ['./lp.component.scss']
})
export class PageLpComponent implements OnInit {
    private showRegisterForm;
    private registerForm: boolean = false;
    private hideRegisterForm;


    constructor(elm: ElementRef) {

    }

    ngOnInit() {
        this.showRegisterForm = function () {
            this.registerForm = true;
        }
        this.hideRegisterForm = function () {
            this.registerForm = false;
        }
    }

}

Template

<a *ngIf="!registerForm" (click)="showRegisterForm()" class="btn btn-primary">
    Register
</a>

<div *ngIf="registerForm">
    <page-lp-register></page-lp-register>
    <hr>
    <a (click)="hideRegisterForm()" class="btn btn-default">Cancel</a>
</div>