Added post and get function

This commit is contained in:
Whizel 2019-04-06 18:02:27 +02:00
parent 80239953d3
commit cf721cc4af
3 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,8 @@
.myButtonComponent {
background-color: #30bcff;
border-radius: 100;
width: 200;
height: 200;
text-align: center;
vertical-align: middle;
}

View file

@ -0,0 +1,3 @@
<StackLayout>
<Button [text]="text" class="btn btn-primary myButtonComponent" (tap)="onTap($event)"></Button>
</StackLayout>

View file

@ -0,0 +1,23 @@
import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';
import { TouchGestureEventData, GestureEventData } from 'tns-core-modules/ui/gestures'
@Component({
selector: 'ns-my-button',
templateUrl: './my-button.component.html',
styleUrls: ['./my-button.component.css'],
moduleId: module.id,
})
export class MyButtonComponent implements OnInit {
@Output() tap: EventEmitter<GestureEventData> = new EventEmitter<GestureEventData>();
@Input() text: string;
constructor() { }
ngOnInit() {
}
public onTap(args: GestureEventData): any {
this.tap.emit(args);
}
}