Added post and get function
This commit is contained in:
parent
80239953d3
commit
cf721cc4af
|
@ -0,0 +1,8 @@
|
||||||
|
.myButtonComponent {
|
||||||
|
background-color: #30bcff;
|
||||||
|
border-radius: 100;
|
||||||
|
width: 200;
|
||||||
|
height: 200;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
<StackLayout>
|
||||||
|
<Button [text]="text" class="btn btn-primary myButtonComponent" (tap)="onTap($event)"></Button>
|
||||||
|
</StackLayout>
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user