Create doesn't exist in type of Actionsheet


I have problem with actionsheet in ionic 2…

This is the code

import {Page, NavController} from 'ionic-angular';
import {ActionSheet} from 'ionic-native';

  templateUrl: 'build/pages/home/home.html'
export class HomePage {
  constructor(public nav: NavController) {}
    let sheet = ActionSheet.create({
        title : 'Sign In as',
        buttons : [
             handler : () =>{
                console.log('Cancel clicked');
             handler : ()=>{
                console.log('Cancel clicked');
             handler : ()=>{
                console.log('Cancel clicked');

when i try to ionic serve there are errors

TypeScript error:

D:/xampp/htdocs/payogo/android_2/Payogo/app/pages/home/home.ts(41,33): Error TS2339: Property 'create' does not exist on type 'typeof ActionSheet'.

Please help me thanks


I believe that you’re mixing the native ActionSheet and the Ionic one, i.e. you’re importing the first one but using it like the second one. If you want to use the native implementation, then you should use the show() method (check out the available options here). If you want to use the Ionic 2 ActionSheet then change your import statement this way:

import {ActionSheet} from 'ionic-angular';


thank you very much…