Set focus on an input with Ionic 2

后端 未结 10 2055
被撕碎了的回忆
被撕碎了的回忆 2020-12-14 00:29

SOLVED :

import { Component, ViewChild} from \'@angular/core\';
import { Keyboard } from \'ionic-native\';


@Component({
  templateUrl: \         


        
10条回答
  •  悲哀的现实
    2020-12-14 00:52

    If you need to set focus on an input at init component, set the class input-has-focus by default to ion-item just like this:

    
    

    That's all!

提交回复
热议问题