Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 48979 articles
Browse latest View live

No provider for UserService!

$
0
0

@Manel00 wrote:

Error: StaticInjectorError(AppModule)[UploaderPage -> UserService]: 
  StaticInjectorError(Platform: core)[UploaderPage -> UserService]: 
    NullInjectorError: No provider for UserService!

Hi everyone, im following this tutorial on youtube: https://www.youtube.com/playlist?list=PLYxzS__5yYQnpK36-GJjm7IEAuHR7IExa
But on #4 its giving me an error that i cannot figure out how to fix it, because it seems that everything is ok, but the problem is at the time to go to some page (register and login pages) it gives me the error “cannot get /page” and when i click on a “upload” tab it gives me the error from above… where is the place that i should take a look to make it works? thank you so much

Regards

Posts: 1

Participants: 1

Read full topic


Unexpected value 'IonicAcademyModule' imported by the module 'AppModule'. Please add a @NgModule annotation

$
0
0

@rranjan306 wrote:

I m importing ’ IonicAcademyModule ’ from my custom ionic module.

this is my app.module.ts file

import { IonicAcademyModule, AcademyProvider } from ‘ngx-lovelace-mobile-lib-common’;

@NgModule({
declarations: [
MyApp,
],
imports: [
BrowserModule,
IonicStorageModule.forRoot(),
RestangularModule.forRoot(RestangularConfigFactory),
AppCommonModule,
IonicAcademyModule,
IonicModule.forRoot(MyApp, {tabsPlacement: ‘top’}),
],
bootstrap: [IonicApp],
entryComponents: [
MyApp
],
providers: [
AcademyProvider
]
});

I m using lazy loading for my project.

You can see the repo for custom ionic module.

Posts: 1

Participants: 1

Read full topic

Backstacking problem ionic 3

$
0
0

@siddheshdeshpande47 wrote:

We are working on an app using ionic 3. We are facing the problem of stacking of pages in our app. Could some one tell how to remove this issue. If we open a page a single time then we can revert back to home page in a single time but if we open any page multiple times then we have to revert back the same number times to get back to home page.

Posts: 1

Participants: 1

Read full topic

Calling method inside itselft

$
0
0

@Vartex05 wrote:

Hi, iam using cordova nfc plugin in my app, to read nfc tag, then i check if it is correct on the server and i navigate to next page, or activate reader again.My code in service(userService) looks like this:

public startReading(){
        return new Promise((resolve,reject)=>{
            nfc.readerMode(nfc.FLAG_READER_NFC_A,(tag)=>{
                nfc.disableReaderMode();
                resolve(this.transformTag(tag.id));
            },err=>{
                console.log(err);
                nfc.disableReaderMode();
                reject(err);
            });
        });
    }

and in my page i use it like this:

ionViewWillEnter(){
    console.log("nfcAktivaceLogin");
    this.platform.ready().then(()=>{
      this.userService.startReading().then((tagId)=>{
        console.log("tagid",tagId);
        this.uisLogin(tagId);
      });
    })
  }

uisLogin(tagID){
    let loading=this.loadingCtrl.create({
      spinner:'crescent'
    });
    loading.present();
    this.productService.loginEmployee(tagID).subscribe((data)=>{
      console.log("Výsledek",data);
      loading.dismiss();
      this.navCtrl.push(HomePage);
    }, err=>{
      loading.dismiss();
      this.userService.startReading().then((tagId)=>{
        console.log("tagid",tagId);
        this.uisLogin(tagId);
      });
      let alert = this.alertCtrl.create({
        title: err.message,
        buttons: ['OK']
      });
      alert.present();
    });
  }

In uisLogin Method, iam calling itself inside it, is it a problem? I kinda think that it isnt the best solution, but it seems to be working. Any ideas?

Posts: 1

Participants: 1

Read full topic

How can I detect a watermark image

$
0
0

@flycoders_sourav wrote:

I have multiple images fee are watermarked and few are not watermark . how can I detect which one marked and which one not marked . please can you help me any one . any help or source would be highly appreciated

thanks in advance

Posts: 1

Participants: 1

Read full topic

Can I import pages into ion-slides?

$
0
0

@dccil wrote:

Is it possible to import pages(from src/pages your generate) into Slides? I generated a few pages, and I edited the HTML and .ts files for something. I would like to import those pages into ion-slides since the HTML and .ts files of those pages are lengthy and doing all the slides in one page seems a little disorganized.

something like

<ion-slides>
      <ion-slide>
            {{import page 1 here}}?
       </ion-slide>

       <ion-slide>
             {{import page 2 here}}
        </ion-slide>
</ion-slides>

Posts: 1

Participants: 1

Read full topic

How to lazy load a large JS import?

$
0
0

@schngrg wrote:

One of our app uses some large libraries like three.js, moment etc and it all gets compiled as one large vendor.js which has all the node_modules packed together. And this massive .js is loaded at app launch (at least with v3, I wonder if this changed with v4).

Is there a way import these large libraries such that they are lazy loaded when needed - which in our case will be right after the first page is displayed and becomes interactive. A solution that works with either v3 or v4 will help.

Posts: 1

Participants: 1

Read full topic

Ionic 4.0.1 - Remove iOS scroll "bounce"

$
0
0

@mlynch wrote:

I’m writing an app for both iOS and Android.

On Android, when the user reaches the bottom of the page, the scrolling stops. On iOS, when the user reaches the bottom of the page it “bounces” past the end of the page and shows a white background. I don’t want it to do this - the background of my page is dark grey, and this overscroll looks terrible.

I’ve already added the following three lines to the config.xml file:

<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />

But they don’t have any effect.

What else can I do to prevent this over-scroll, “bounce” effect?

Posts: 1

Participants: 1

Read full topic


Set sass variable value in Ionic from web api for white label system

$
0
0

@kuntal wrote:

I am doing ionic-angular from last few weeks ,and now I have a requirement ,dynamically style public site .The site admin set various color codes and logo image from admin in database and these will reflect when the Public Site opens .

As I am from asp.net background ,previously what is do is,on master page load take values from DB and write into a .less file ,and less java-script library take care of it, its simple there.

But for current situation I am using sass and not able find a way how to write variables value into .scss file .

I just learn a new thing APP_INITIALIZER from here ,but ultimately this post not showing how to write in the .scss file.

I am actually thinking this with my asp.net knowledge,but may be I am wrong ,or there are another way of implementation.

I want a simple solution ,what we do in asp.net I want to achieve this in same way.

Take variable value from DB via api,when application loading for first time.

Write values in SASS variable file .

After that SASS will take care of this and we get result as expected .

Please give some suggestion or example ,to start with .

Thanks.

Posts: 1

Participants: 1

Read full topic

How to put dropdown menu in ionic header

Install ipa on device

$
0
0

@jfsoftwarellc wrote:

So, so close to being able to test my app on an Apple device.

I’ve signed up for Apple Developer to get the certificate and provisioning.
I’ve signed up for AppFlow to load all that stuff in and generate the build
I have downloaded the .ipa file to my Windows 10 laptop.

Now, how do I install and run it on my iPhone 6? From the command line I’ve tried “ionic cordova run ios” but it says “Error: xcodebuild was not found. Please install version 7.0.0 or greater from App Store”. How to I make it install the existing .ipa file that’s in the project folder instead of trying to build it fresh?

Posts: 1

Participants: 1

Read full topic

Ionic 4 Double Side Menu

$
0
0

@maxlev wrote:

How do i open secondary side menu from button click?
When i pass menuId to menuController open method, i always get to open first/primary side menu.

Posts: 1

Participants: 1

Read full topic

Downloading file

$
0
0

@quant wrote:

I can’t find any documentation on this anywhere, but I am trying to download a file in parts. Does anyone know of a way to download a file in parts and combined them later in ionic?

Posts: 1

Participants: 1

Read full topic

Threejs for Ionic4 possible?

$
0
0

@fkkcloud wrote:

Hi there,

Is using ThreeJS in Ionic4 possible?
I see that Ionic4 now only supports TypeScript and ThreeJS is javascript based library.

Do you think I can import ThreeJS and use it in a .js file to implement a ThreeJS scene and render within Ionic4??

Does anybody has tried it before?

Posts: 1

Participants: 1

Read full topic

What do you do? Ionic storage vs Firebase

$
0
0

@aslan123 wrote:

Hi,

What do you do?

When making a mobile app (Ionic 3 or 4), when should one use Ionic/native storage, and when should one use Firebase? Or do people just use Firebase (real time database, or Firestore, or cloud hosting) for all the storage and ignore local and Ionic storage?

Thanks

Posts: 1

Participants: 1

Read full topic


Ionic 4 ion-select dynamically generated two dropdown based on first dropdown selection, How do I clear the second dropdown?

$
0
0

@Software3809 wrote:

Good day, I’m new in Ionic, I have a form in my ionic project that has 2 dropdown menus of selection ion-select. When the user selects an option in the first dropdown menu, it generates the options in the second dropdown list. This works well. when I add new fields, I can reestablish the values of the first list displayed with [(ngModel)] = null in .ts, but I have not been able to reestablish those in the 2 drop-down list.

thank you

 <div formArrayName="sucursales" margin-bottom>

     <!--generate new registration fields-->
     <section [formGroupName]="i" *ngFor="let tech of   form.controls.sucursales.controls; let i = index">

                <ion-item>
                    <ion-icon name="list" item-start></ion-icon>
                    <ion-label>Departamento</ion-label>
                    <ion-select [(ngModel)]="locate" name="country" #country formControlName="country" (ionChange)="CountryChange($event)">
                        <ion-option *ngFor="let department of ubicacion; let i = index" value="{{department.departamento}}">{{department.departamento}}</ion-option>
                    </ion-select>
                </ion-item>

                <ion-item *ngFor="let x of selectedMunicipality">
                    <ion-icon name="list" item-start></ion-icon>
                    <ion-label>Municipio</ion-label>
                    <ion-select [(ngModel)]="locates" name="state" #state formControlName="state">
                        <ion-option *ngFor="let municipio of x.ciudades" value="{{municipio}}">{{municipio}}</ion-option>
                    </ion-select>
                </ion-item>





       //code .ts

       this.http.get('http://localhost/ionic-php-mysql/colombia.json').map(res => res.json()).subscribe(
    data => {

        let headers = new Headers();
        headers.append('Content-Type', 'application/json');

        this.ubicacion = data.colombia;
    },
    error => {
        console.log("Oops!", error);
    }

);

   CountryChange(value: string) {

          this.locate = null;  //It works well
          this.locates = null; //it does not work

          this.selectedMunicipality = this.ubicacion.filter(item =>      item.departamento === value)
 }


.

Posts: 1

Participants: 1

Read full topic

How to build an app with iOS 12.1 SDK or later?

$
0
0

@skydive wrote:

Last time I submitted my app to iTunes Connect I’ve got this email from Apple:

SDK Version Issue - This app was built with the iOS 11.2 SDK. Starting March 2019, all iOS apps submitted to the App Store must be built with the iOS 12.1 SDK or later, included in Xcode 10.1 or later.

On the other side, Ionic documentation clearly states::

We recommend using XCode 9. Xcode 10 support in Cordova is still a work-in-progress. See this issue for details.

Any recommendations how to solve this and build Ionic app with iOS 12.1?

And more general question: how do you know what iOS SDK you’re currently using and how to change it? I did some research to find answers to these questions, but didn’t find any.

Appreciate your help.

Posts: 3

Participants: 2

Read full topic

[Errorr] [cordova plugin market] why Can't resolve all parameters for my app [?]

$
0
0

@anitatmj wrote:

hi all why i got this errorr
Error: Can’t resolve all parameters for MyApp: ([object Object], [object Object], [object Object], [object Object], [object Object], ?).

i use ionic v 3 [3.9.2]
cordova plugin market is spec=“1.2.0”.

this my config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.biografisultaniskandarmuda1" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Biografi Sultan Iskandar Muda</name>
    <description>An awesome Ionic/Cordova app.</description>
    <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="ScrollEnabled" value="false" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <preference name="StatusBarBackgroundColor" value="#333333" />
    <platform name="android">
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
    </platform>
    <plugin name="cordova-plugin-whitelist" spec="1.3.3" />
    <plugin name="cordova-plugin-statusbar" spec="2.4.2" />
    <plugin name="cordova-plugin-device" spec="2.0.2" />
    <plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
    <plugin name="cordova-plugin-ionic-webview" spec="^2.0.0" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
    <plugin name="cordova-plugin-x-socialsharing" spec="5.4.4" />
    <plugin name="cordova-plugin-apprate" spec="1.4.0" />
    <plugin name="cordova-plugin-admob-free" spec="0.25.0">
        <variable name="ADMOB_APP_ID" value="ca-app-pub-1312092729851913~6922673794" />
    </plugin>
    <engine name="android" spec="7.1.4" />
    <plugin name="cordova-plugin-market" spec="1.2.0" />
</widget>

i was import it to app.modules…ts & app.component.ts
please help me

Posts: 1

Participants: 1

Read full topic

Button enabled looks disabled until mouseover event

$
0
0

@kirliam wrote:

I have a ion-button in my header like below:

<ion-header>
    <ion-toolbar color="primary">
        <ion-buttons slot="start">
            <ion-back-button defaultHref="dashboard"></ion-back-button>
        </ion-buttons>
        <ion-title>Configurações</ion-title>
        <ion-buttons slot="end">
            <ion-button [disabled]="disableButton()" (click)="save()" title="Salvar Alterações">
                <ion-icon slot="icon-only" name="wine"></ion-icon>
            </ion-button>
            <user-button></user-button>
        </ion-buttons>
    </ion-toolbar>    
</ion-header>

when the button becomes enabled (disableButton() returns false due some change in the page), the DOM is modified correctly by angular, but the button appearance is still disabled. And if I move the mouse over the button then it becomes really enabled! It’s happening on Chrome and Android, but not on Firefox!
Any ideas?

Posts: 1

Participants: 1

Read full topic

The number of method references in a .dex file cannot exceed 64K

$
0
0

@obinnae wrote:

My V3 app code worked fine when testing on a device via “ionic cordova run android”. But all of a sudden, in doing a build, I’m getting the error

The number of method references in a .dex file cannot exceed 64K.

and I can’t do much at this point. Been googling for answers but not much luck.

Any idea how to fix this?

Posts: 2

Participants: 1

Read full topic

Viewing all 48979 articles
Browse latest View live


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