Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import {Component, ElementRef, ViewChild} from '@angular/core';
import {NavController, NavParams, ViewController} from "ionic-angular";
import {TabsService} from "../../pages/tabs/tabs.service";
import {AppService} from "../../service/http.service";
import {Keyboard} from "@ionic-native/keyboard";
@Component({
selector: 'comment',
templateUrl: 'comment.html'
})
export class CommentComponent {
@ViewChild('textAreaElement') textAreaElement:ElementRef;
replyContent:string;
placeholder:string;
constructor(public navCtrl: NavController, public navParams: NavParams,
private tabSer: TabsService,private keyboard:Keyboard,
public viewCtrl: ViewController, public appService: AppService) {
this.placeholder = this.navParams.get('placeholder');
setTimeout(()=>{
this.textAreaElement.nativeElement.focus();
this.keyboard.show();
},500)
}
close() {
this.viewCtrl.dismiss();
}
stop(e) {
e.stopPropagation();
}
submit(){
this.viewCtrl.dismiss(this.replyContent);
}
}