Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 71531 articles
Browse latest View live

AppRootToken is not defined in android prod build

$
0
0

@Kousika wrote:

Hi Team,
Please help me to fix the below error when I try to build android app with --prod :

Uncaught ReferenceError: AppRootToken is not defined
    at Function.t.forRoot (main.js:63)
    at main.js:59
    at Object.<anonymous> (main.js:59)
    at e (main.js:1)
    at Object.<anonymous> (main.js:50)
    at e (main.js:1)
    at Object.<anonymous> (main.js:74)
    at e (main.js:1)
    at main.js:1
    at main.js:1

Here is my ionic info,

cli packages: 

    @ionic/cli-utils  : 1.12.0
    ionic (Ionic CLI) : 3.12.0

global packages:

    cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) 

local packages:

    @ionic/app-scripts : 1.3.7
    Cordova Platforms  : android 6.2.0
    Ionic Framework    : ionic-angular 3.3.0

System:

    Android SDK Tools : 26.1.1
    Node              : v6.17.0
    npm               : 3.10.10 
    OS                : macOS High Sierra

Misc:

    backend : pro

Here is my package.json:

{
  "name": "Ionic",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "4.1.2",
    "@angular/compiler": "4.1.2",
    "@angular/compiler-cli": "4.1.2",
    "@angular/core": "4.1.2",
    "@angular/forms": "4.1.2",
    "@angular/http": "4.1.2",
    "@angular/platform-browser": "4.1.2",
    "@angular/platform-browser-dynamic": "4.1.2",
    "@ionic-native/app-version": "^3.10.2",
    "@ionic-native/call-number": "^3.10.2",
    "@ionic-native/camera": "^3.10.2",
    "@ionic-native/contacts": "^3.10.2",
    "@ionic-native/core": "3.10.2",
    "@ionic-native/device": "^3.10.2",
    "@ionic-native/diagnostic": "^3.10.2",
    "@ionic-native/facebook": "^3.10.2",
    "@ionic-native/geolocation": "^3.10.2",
    "@ionic-native/google-analytics": "^3.10.2",
    "@ionic-native/google-maps": "^3.10.2",
    "@ionic-native/google-plus": "^3.10.2",
    "@ionic-native/image-picker": "^3.10.2",
    "@ionic-native/keyboard": "^3.10.2",
    "@ionic-native/network": "^3.10.2",
    "@ionic-native/push": "^3.10.2",
    "@ionic-native/sms": "^3.10.2",
    "@ionic-native/social-sharing": "^3.10.2",
    "@ionic-native/spinner-dialog": "^3.10.2",
    "@ionic-native/splash-screen": "3.10.2",
    "@ionic-native/status-bar": "3.10.2",
    "@ionic-native/toast": "^3.10.2",
    "@ionic/cloud-angular": "^0.12.0",
    "@ionic/storage": "2.0.1",
    "angular2-moment": "^1.3.3",
    "cordova-android": "^6.2.0",
    "cordova-plugin-device": "^1.1.4",
    "cordova-plugin-google-analytics": "^1.8.4",
    "cordova-plugin-ionic-webview": "^1.2.1",
    "cordova-plugin-splashscreen": "^4.0.3",
    "cordova-plugin-whitelist": "^1.3.1",
    "cordova-plugin-x-toast": "~2.7.2",
    "hammerjs": "2.0.8",
    "ionic-angular": "3.3.0",
    "ionic-plugin-keyboard": "~2.2.1",
    "ionicons": "3.0.0",
    "q": "1.4.1",
    "rxjs": "^5.1.1",
    "socket.io-client": "^1.6.0",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^1.3.7",
    "@types/googlemaps": "3.26.0",
    "typescript": "^2.9.2"
  },
  "description": "An Ionic project",
  "config": {
    "ionic_webpack": "./webpack.config.js"
  },
  "cordova": {
    "plugins": {
      "ionic-plugin-keyboard": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-x-toast": {},
      "cordova-plugin-googlemaps": {
        "API_KEY_FOR_ANDROID": "",
        "API_KEY_FOR_IOS": ""
      },
      "cordova-plugin-console": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-spinner-dialog": {},
      "cordova-plugin-x-socialsharing": {},
      "cordova-plugin-googleplus": {
        "REVERSED_CLIENT_ID": ""
      },
      "cordova-plugin-camera": {},
      "cordova-plugin-contacts": {},
      "cordova-plugin-geolocation": {},
      "cordova-plugin-network-information": {},
      "es6-promise-plugin": {},
      "cordova-plugin-telerik-imagepicker": {},
      "cordova-plugin-facebook4": {
        "APP_ID": "",
        "APP_NAME": ""
      },
      "ionic-plugin-deploy": {},
      "cordova-plugin-google-analytics": {
        "GMS_VERSION": "11.0.1"
      },
      "phonegap-plugin-push": {
        "SENDER_ID": ""
      }
    },
    "platforms": [
      "android"
    ]
  }
}

P.S: I also have referred the following links but none helped me

Posts: 1

Participants: 1

Read full topic


Firebase auth 'onAuthStateChanged()' makes tabs not update

$
0
0

@mrg250 wrote:

hello all :grinning:,
I have an app that whenever a user isn’t authenticated he is redirected to login, else, he is directed to the tabs page.
Code (app.component.ts):

  platform.ready().then(() => {
        


        _authFire.auth.onAuthStateChanged((user)=>{
          if(user){
            this.nav.setRoot('TabsPage').then(()=>{
               splashScreen.hide();
           })
          }else{
           this.nav.setRoot('loginPage').then(()=>{
               splashScreen.hide();
             })
          }
        })
      
        
        statusBar.styleDefault();
      });

(tabs.ts)


@IonicPage()
@Component({
  selector: 'page-tabs',
  templateUrl: 'tabs.html',
})
export class TabsPage {
  personal:any = 'PersonalAreaPage';
  maps:any = 'MapPage';
  options:any = 'OptionsPage';
  
  private param: any;
  constructor(public navCtrl: NavController, private alertCtrl: AlertController,private navParam: NavParams, 
    private _loadingCtrl: LoadingController,
    private _userHandler: UserHandlerProvider,
    ) {
      
      

      
    }

(tabs.html)

<ion-tabs selectedIndex="1">
  <ion-tab [root]="personal" tabIcon="person"></ion-tab>
  <ion-tab [root]="maps" tabIcon= "map"></ion-tab>
  <ion-tab [root]="options" tabIcon="options"></ion-tab>
</ion-tabs>

Expectation:
Clicking on a tab will bring user to respected page, and the tab will be highlighted as a result of the page being active. Simple tabs activity.

Problem:
Clicking on a tab does directs to its page, BUT, the icons are not updated, and seems to be stuck at the previous activated tab icon.

(for example, clicking on homeTab will still highlight optionsTab icon even though mapTab is fully loaded)

Problem identified (?):
Simply setting the root (with no ‘onAuthStateChanged()’ invoked) to ‘TabsPage’, seems to fix this bug.
but this is not solution…

Can you please help me with this?

Posts: 1

Participants: 1

Read full topic

Geofence not working in Ionic 4

$
0
0

@cathrinerathje wrote:

I have followed the approach for implementing Geofence in Ionic 4: https://ionicframework.com/docs/native/geofence

When run in the browser with ‘ionic cordova run browser’ I get the following in the console:
Ionic Native: deviceready event fired after 537 ms
Error: exec proxy not found for :: GeofencePlugin :: deviceReady
Error: exec proxy not found for :: GeofencePlugin :: initialize
Error: exec proxy not found for :: GeofencePlugin :: addOrUpdate
ERROR Error: Uncaught (in promise): Missing Command Error
Unhandled Promise rejection: Missing Command Error ; Zone: ; Task: null ; Value: Missing Command Error

I don’t know if these are real errors or just because I need to run it on a device.
I have also deployed to Android and when running on android with ‘ionic cordova run android’ everything seems to run fine, but I get no notifications from the Geofencing and I can’t see if I get any errors…

Home.page.ts

import { Geofence } from '@ionic-native/geofence/ngx';

constructor(private geofence: Geofence) {
geofence.initialize().then(()=>{
      console.log('geofence plugin ready'),
      (err)=>{
        console.log('geo error', err);
      }
    });
this.addGeoFence();
}

private addGeofence(){
    let fence ={
      id: '69ca1b88-6fbe-4e80-a4d4-ff4d3748acdb',
      latitude: 55.663102,
      longitude: 12.590352,
      radius: 100,
      transitionType: 3,
      notification: {
        id: 1,
        title: 'You crossed a sight',
        text: 'You just arrived',
        vibrate: [2000],
        openAppOnClick: true
      }

    }
    this.geofence.addOrUpdate(fence).then(()=>{
      console.log('geofence added'),
      (err) =>{
        console.log('geofence failed to add')
      }
    });
  }

Please do you have any suggestions for why it is not working? :slight_smile:

Posts: 1

Participants: 1

Read full topic

Removing item from local storage is not working

$
0
0

@aligassan wrote:

l am using Ionic 4 to build app weather and I added property to save cities in local storage .

I want to remove item weather city from local storage.

I did like that , but it doesn’t remove item from list:

  deleteItem(city){
    localStorage.removeItem('cities')
  } 

My full code including deleteItem

      // get weather data from provider     
      getWeather(city :string){
        this.weather.city(city).then(data=>{

          if (data) {
            this.weatherList.push(JSON.parse(data.data))
            console.log(data.data)
          //  save city with data
          this.saveWeatherEntry(city, data);

          // test the storage, 
          let entry = this.getWeatherEntry(city);
          console.log(city);
          console.log(entry);
          } else {


          }


        });
      }


      // check if exist before in local storage
      saveWeatherEntry(city, data) {
        let items_json = localStorage.getItem('cities');
        let items = [];
        if(items_json) {
           items = JSON.parse(items_json);
           let city_index = -1;
           for(let i = 0; i < items.length; i++) {
              if(items[i].city == city) {
                city_index = i;
                break;
              }
           }

           if(city_index != -1) {
              items[city_index].data = data;
           } else {
              items.push({
                 city: city,
                 data: data
              });
           }

        } else {
           items.push({
              city: city,
              data: data
           });
        }   
        //save changes
        localStorage.setItem('cities', JSON.stringify(items));
      }

      // check if exist before in local storage
      getWeatherEntry(city) {
        let items_json = localStorage.getItem('cities');
        if(items_json) {
          let items = JSON.parse(items_json);
          let city_index = -1;
          for(let i = 0; i < items.length; i++) {
             if(items[i].city == city) {
               return items[i].data;
             }
          }
        }
        return false;
      }

    // delete item          
    deleteItem(city){
        localStorage.removeItem('cities')
      }

Any solution please?

Posts: 1

Participants: 1

Read full topic

Ionic tabs error

$
0
0

@Fares95 wrote:

Hello , After i created tabs page , and injected it in app.module.ts and then it doesn’t appear when i launched ionic serve ,
so i did use something in my app.page .html , it appeared but the side menu stopped working .
the application do not display any error but the side menu just stopped working .

My app.page.html

<div class="{{global.state['theme']}}">

  <!--Dark Design Menu-->
  <ion-menu [content]="content" id="menu-dark">
    <ion-header class="sidemenuHeader">
      <ion-toolbar>
        <ion-item no-lines>
          <ion-avatar item-left>
            <h2>G</h2>
          </ion-avatar>
          <h2>Bonjour,invité</h2>
          <p>Bienvenu à E-Reclamation !</p>
        </ion-item>
      </ion-toolbar>
    </ion-header>


    <ion-content class="menu">
      <ion-list>
        <button menuClose="left" ion-item *ngFor="let p of pages" (click)="openPage(p)">
          <ion-icon [name]="p.icon" item-left></ion-icon>  {{p.title}}
        </button>
      </ion-list>
    </ion-content>
  </ion-menu>
  <!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
  <ion-nav [root]="rootPage" [root]="rootsPage" #content swipeBackEnabled="false"></ion-nav>

  

</div>

my app.component.ts

import { AppState } from './app.global';
import { Component, ViewChild } from '@angular/core';
import { Nav, Platform, MenuController } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Subject } from 'rxjs';
import { SideMenuPage } from '../pages/side-menu/side-menu';
import { ConnecterPage } from '../pages/connecter/connecter';
import { InscriptionPage } from '../pages/inscription/inscription';
import { SettingsPage } from '../pages/settings/settings';
import { TabsPage } from '../pages/tabs/tabs';

@Component({
  templateUrl: 'app.html'
})
export class MyApp {
  @ViewChild(Nav) nav: Nav;
tabsroots: any = TabsPage;
  rootPage: any = 'SideMenuPage';
  activePage = new Subject();

  pages: Array<{ title: string, component: any, active: boolean, icon: string }>;
  rightMenuItems: Array<{ icon: string, active: boolean }>;
  state: any;

  constructor(
    public platform: Platform,
    public statusBar: StatusBar,
    public splashscreen: SplashScreen,
    public global: AppState,
    public menuCtrl: MenuController
  ) {
    this.initializeApp();
    this.rightMenuItems = [
      { icon: 'home', active: true },
      { icon: 'contact', active: false },
      { icon: 'settings', active: false }

    ];

    this.pages = [

      { title: 'Home', component: 'SideMenuPage', active: true, icon: 'home' },
      { title: 'Se Connecter', component: ConnecterPage, active: false, icon: 'contact' },
        { title: 'Inscrivez-vous', component: InscriptionPage, active: false, icon: 'contact' },
      { title: 'Parametres', component: SettingsPage, active: false, icon: 'settings' }

     ];

    this.activePage.subscribe((selectedPage: any) => {
      this.pages.map (page => {
        page.active = page.title === selectedPage.title;
      });
    });
  }

  initializeApp() {
    this.platform.ready().then(() => {
      this.global.set('theme', '');
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      this.statusBar.styleDefault();
      this.splashscreen.hide();
      this.menuCtrl.enable(false, 'right');
    });
  }

  openPage(page) {
    // Reset the content nav to have just this page
    // we wouldn't want the back button to show in this scenario
    this.nav.setRoot(page.component);
    this.activePage.next(page);
  }

  rightMenuClick(item) {
    this.rightMenuItems.map(menuItem => menuItem.active = false);
    item.active = true;
  }
}

Posts: 1

Participants: 1

Read full topic

Bug in Creator?

$
0
0

@stemmo wrote:

The problem seems to be when I set a left icon for a list item.
When I want to remove it I select ‘No icon’ in the list.
Then I export the project on my PC but when I run ‘ionic serve’ I’ve got an error for an InvalidCharacter.
Looking in the HTML file of the page I found:

<ion-icon name="No Icon" item-left></ion-icon>

with a space inside the name attribute.
When I removed the space I solved the error.

Posts: 1

Participants: 1

Read full topic

Ionic Calendar Component

$
0
0

@diptimanmitra wrote:

I wanted to implement Calendar picker similar to date picker component without using native calendar of device. Can you please help ?

Posts: 1

Participants: 1

Read full topic

Load different module when app opens based on variable in storage

$
0
0

@schmidtkevinall wrote:

For a hybrid app running on iOS and Android, I want to load a different module when the user opens the app the first time. This will based on a boolean variable in storage. If it’s false or doesn’t exist, open the “First Time” module, if it’s true, open the “Main App” module. What needs to be done in order to make this happen with the router?

I’m using Apache Cordova and would ideally make this determination in the deviceReady function. If there is a better place to handle this, please let me know.

Thanks,

K

Posts: 1

Participants: 1

Read full topic


Change animations or transitions(Ionic 4)

$
0
0

@dnietoandres wrote:

Hey there,

I was wondering if i can change animation/ transition in ion-fab. Let me explain, you can have an ion-fab-list inside an ion-fab, so when you tap that ion-fab, the ion-fab-list makes a transition or animation to be showed.

It is possible to change that transition?

Thanks!

Posts: 1

Participants: 1

Read full topic

[Ionic-v4] Best way to faster download images and display responsive, in ionic

$
0
0

@william17 wrote:

I would like to fast download these objects in my ionic 4 app and display the image.

1- I do that with the http client in ionic. I can get my data and display images but the download is too slow because of images.

2- And when i display that, they are not responsive although I use grid. No problem In browser, only in android device.

I use Ionic 4, my Backend is base on spring boot.

Hope i will get help or orientation.

Thanks
Best regards.

Posts: 1

Participants: 1

Read full topic

How to get started with Ionic Native Paypal?

$
0
0

@diezalina wrote:

Hi! I’ve followed the basic info found in thedocs, and even found two posts on the forum about this. Yet, I have not been able to do anything with Paypal as of yet, since I can’t find a tutorial on this, I’ve tried creating a service using the base code given by the docs and to no avail if I call the service into a page’s ts I get an error instantly…

The info provided from the official docs it’s nothing that can help a beginner on the subject, and I would like to know where is the direction I should be pointing to…

Posts: 1

Participants: 1

Read full topic

SyntaxError: Identifier 'h' has already been declared

$
0
0

@htg wrote:

Hi,

I have been developing a pwa app using the stencil starter.
After updating to the latest stencil/core v0.18.1 my app generates ok using “npm start”, however, sometimes the above error appears when the menu loads and sometimes when trying to load the an item from the menu for the first time. The items will no longer load from the menu.

Quite often something will go a bit strange and I have found stopping the dev server and regenerating the app will fix the problem. This one seems to be a bit stubborn.

I know it is early days for stencil, but I was wondering if any one has come across this problem and if a solution was found.

Thanks Hilton.

Posts: 1

Participants: 1

Read full topic

FileChooser not giving File Browser on Android Emulator

$
0
0

@jusliong wrote:

Hi,
I am using FileChooser from ionic-native

I have just started my project, so there isn’t much code
But my file chooser is not giving even a file browser in my Android Emulator of Nexus 5X

This is my HTML file, which is binded to chooseFile event which has filechooser:

<ion-button (click)="chooseFile()">
  Choose file
</ion-button>

Inside my TS file, the chooseFile is defined as:

chooseFile(){
this.fileChooser.open()
      .then(uri => console.log(uri))
      .catch(e => console.log(e));
  }

Which produces the result as shown:

However the file browser does not show up when the button is clicked - nothing happens

Is there anything I did wrong?

Posts: 1

Participants: 1

Read full topic

Building iOS app with --prod will not run in Xcode 10 simulator

$
0
0

@dave-k wrote:

Building iOS app with --prod will not run in Xcode 10 simulator
$ ionic cordova build ios --prod

Xcode console:

libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
Apache Cordova native platform version 4.5.5 is starting.
Multi-tasking -> Device: YES, App: YES
CDVWKWebViewEngine: trying to inject XHR polyfill
CDVWKWebViewEngine will reload WKWebView if required on resume
Using Ionic WKWebView
[CDVTimer][console] 0.082016ms
[CDVTimer][handleopenurl] 0.109911ms
[CDVTimer][intentandnavigationfilter] 1.754045ms
[CDVTimer][gesturehandler] 0.052094ms
[CDVTimer][file] 1.561999ms
CDVIonicKeyboard: resize mode 1
[CDVTimer][keyboard] 1.948953ms
[CDVTimer][splashscreen] 5.697966ms
[CDVTimer][statusbar] 4.747987ms
[CDVTimer][socialsharing] 0.107050ms
[CDVTimer][TotalPluginStartup] 17.371058ms
Ionic Native: deviceready event fired after 720 ms
$ ionic cordova build ios --prod
> ionic-app-scripts build --prod --target cordova --platform ios
[20:27:38]  ionic-app-scripts 3.2.1 
[20:27:38]  build prod started ... 
[20:27:38]  clean started ... 
[20:27:38]  clean finished in 20 ms 
[20:27:38]  copy started ... 
[20:27:39]  deeplinks started ... 
[20:27:39]  deeplinks finished in 498 ms 
[20:27:39]  ngc started ... 
[20:27:57]  ngc finished in 18.42 s 
[20:27:57]  preprocess started ... 
[20:27:57]  preprocess finished in less than 1 ms 
[20:27:57]  webpack started ... 
[20:27:58]  copy finished in 20.08 s 
[20:30:20]  webpack finished in 142.73 s 
[20:30:20]  uglify started ... 
[20:30:20]  sass started ... 
[20:30:24]  sass finished in 3.34 s 
[20:30:24]  cleancss started ... 
[20:30:26]  cleancss finished in 2.11 s 
[20:31:24]  uglify finished in 64.22 s 
[20:31:24]  postprocess started ... 
[20:31:24]  postprocess finished in 44 ms 
[20:31:24]  lint started ... 
[20:31:24]  build prod finished in 226.37 s 
no-unused-variable is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.
[20:31:30]  lint finished in 5.51 s 
> cordova build ios
Reading build config file:
Building for iPhone X Simulator
Building project: /Users/dkennedy/project/ionic/application.2/platforms/ios/myColitis.xcworkspace
	Configuration: Debug
	Platform: emulator
Build settings from command line:
    CONFIGURATION_BUILD_DIR = /Users/dkennedy/project/ionic/application.2/platforms/ios/build/emulator
    SDKROOT = iphonesimulator12.1
    SHARED_PRECOMPS_DIR = /Users/dkennedy/project/ionic/application.2/platforms/ios/build/sharedpch

Build settings from configuration file '/Users/dkennedy/project/ionic/application.2/platforms/ios/cordova/build-debug.xcconfig':
    CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
    CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plist
    CODE_SIGN_IDENTITY = iPhone Developer
    ENABLE_BITCODE = NO
    GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1
    HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)"
    OTHER_LDFLAGS = -ObjC
    SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h

$ 

ionic info

$ ionic info
✔ Gathering environment info - done!

Ionic:

   ionic (Ionic CLI)  : 4.2.1
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.1

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.4, browser 5.0.4, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.1.1, (and 20 other plugins)

System:

   NodeJS : v11.10.0 (/usr/local/Cellar/node/11.10.0/bin/node)
   npm    : 6.7.0
   OS     : macOS High Sierra
   Xcode  : Xcode 10.1 Build version 10B61

$ 

Posts: 1

Participants: 1

Read full topic

Ionic with Woocommerce

$
0
0

@Hammad6264 wrote:

Hey Guys, hope you will be fine. Actually, I need some help from you. I have a ionic project with woocommerce. The problem is that, I want to check if the user course enrolled or not. And if the user is not enrolled the course, the course should not appear him, before purchasing. And if the user is enrolled the course, the course should appear him. Please help??

Posts: 1

Participants: 1

Read full topic


Ionic app for windows 10 platform does not work at all

Ionic cordova plugin add cordova-plugin-youtube-video-player not working

$
0
0

@paulbuscano003 wrote:

Hi,

I have ionic 3 ionic cordova plugin add cordova-plugin-youtube-video-player and when test it in my device it doesn’t work.

package.json
    "@ionic-native/youtube-video-player": "^5.0.0",

config.xml
    <preference name="YouTubeDataApiKey" value="AIzaSyBU7865vDB9p9APyxKtJC2bjrpf7XqiVbo" />

home.ts
import { YoutubeVideoPlayer } from '@ionic-native/youtube-video-player/ngx';

constructor(private youtube: YoutubeVideoPlayer) {
}

  openYoutube() {
    this.youtube.openVideo('F9yf6TtVMmI');
  }

home.html
<button tappable (click)="openYoutube()" class="btn-preview" ion-button color="light" outline small>TEST YOUTUBE</button>

please see screenshot.

Posts: 1

Participants: 1

Read full topic

Append html in ion-content

$
0
0

@NaseerAhmad wrote:

Hi everyone,

I’m tying to add html in my ionic modal’s ion-content which comes from admin dashboard but not yet succeeded any help is appreciated.
my HTML is

<p>Email to <button ion-button block icon-start (click)="sendMail('email@gmail.com')"><ion-icon name="mail"></ion-icon> email@gmail.com</button></p>
<p>&nbsp;</p>
<p>Call <button ion-button block icon-start (click)="callTel('123456789')"><ion-icon name=    "call"></ion-icon>123456789</button></p>

I’ve tried [innerHTML] and jquery’s append methods but in both cases only text is appeared button styles are not applied and functions are not called.

Also tried with pipe for safe HTML (using DomSanitizer).

transform(value: any, args?: any): any {
    return this.sanitizer.bypassSecurityTrustHtml(value);
  }

Thanks

Posts: 1

Participants: 1

Read full topic

Sharing pages

$
0
0

@lohith95 wrote:

Hi ,

I have a filter page and i am trying to call that page from 2 different pages, but its giving the error. But i know its something related to sharing components. Can anyone help me with these?

Posts: 1

Participants: 1

Read full topic

Ionic 4 Routing & core-js

Viewing all 71531 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>