How to create a swipable segment?
Implementation of auto update
@coolestsumit wrote:
is there any way to implement the auto update function . so that if there is any changes in the resources folder of the app, it app can update itself ?
Posts: 1
Participants: 1
Ionic-v4 service
@patrickSiyou wrote:
hi guys, could anyone help me fix this error?
core.js:15714 ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[RegisterPage -> AuthService]:
StaticInjectorError(Platform: core)[RegisterPage -> AuthService]:
NullInjectorError: No provider for AuthService!
Error: StaticInjectorError(AppModule)[RegisterPage -> AuthService]:
StaticInjectorError(Platform: core)[RegisterPage -> AuthService]:
NullInjectorError: No provider for AuthService!
at NullInjector.push…/node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:8894)
at resolveToken (core.js:9139)
at tryResolveToken (core.js:9083)
at StaticInjector.push…/node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8980)
at resolveToken (core.js:9139)
at tryResolveToken (core.js:9083)
at StaticInjector.push…/node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8980)
at resolveNgModuleDep (core.js:21120)
at NgModuleRef_.push…/node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21809)
at resolveNgModuleDep (core.js:21120)
at resolvePromise (zone.js:831)
at resolvePromise (zone.js:788)
at zone.js:892
at ZoneDelegate.push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
at Object.onInvokeTask (core.js:17280)
at ZoneDelegate.push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
at Zone.push…/node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
at drainMicroTaskQueue (zone.js:601)my authService
import { Injectable } from '@angular/core'; import { FirebaseService } from './firebase.service'; import { Observable } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class User { name: string; email: string; constructor(name: string, email: string) { this.name = name; this.email = email; } } export class AuthService { constructor(public firebaseService: FirebaseService) { } }
my register page
import { Component, OnInit } from '@angular/core'; import { Validators, FormBuilder } from '@angular/forms'; import { Router } from '@angular/router'; import { AuthService } from 'src/app/services/auth.service'; @Component({ selector: 'app-register', templateUrl: './register.page.html', styleUrls: ['./register.page.scss'], }) export class RegisterPage implements OnInit { constructor(private formBuilder: FormBuilder, private authService: AuthService, private router: Router) {} }
thankyou.
Posts: 1
Participants: 1
Ng2-img-cropper | How to import component in Ionic 3 Lazy loading
@cyrusjayson wrote:
Hi, Please guide me how to import module in lazy loading.! 11%20PM|533x500
I am following this tutorial https://www.jianshu.com/p/a5bdedcaa9ab everything works. but when I implement the plugin to existing project with lazy loading its not working (see the attached imaged). I don’t know what to import and where to import the module.
Posts: 1
Participants: 1
Push plugin problem
@sipodsoftware wrote:
Hey!
I have installed push plugin, imported it in app.module.ts as a provider, and imported it page where I want to use it. My code looks like this:
I get this error:
when progam tries to run pushObject.on(‘notification’) function.
Can anyone help me to resolve this issue? Thanks!
Posts: 1
Participants: 1
Can't build on iOS Error code 70
@Yozahim wrote:
Im not able to build my project (created with js, vue.js, vuex) on iOS platform. Exactly the same project works on web while typing
nom run dev
and I was able to build it on Android on laptop with Windows. When I’m tryingCordova run iOS
got something like this:xcodebuild: error: Unable to find a destination matching the provided destination specifier: --HERE a lot of simulators-- Ineligible destinations for the "HelloCordova" scheme: { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device } { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device } CordovaError: Promise rejected with non-error: 'Error code 70 for command: xcodebuild with args: -xcconfig,/Users/username/Downloads/vue-webpack-vuetify-vuex-cordova-boilerplate-master copy/platforms/ios/cordova/build-debug.xcconfig,-workspace,HelloCordova.xcworkspace,-scheme,HelloCordova,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/username/Downloads/vue-webpack-vuetify-vuex-cordova-boilerplate-master copy/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/username/Downloads/vue-webpack-vuetify-vuex-cordova-boilerplate-master copy/platforms/ios/build/sharedpch' at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15) at process._tickCallback (internal/process/next_tick.js:68:7)
Iv also triedcordova build ios -- --buildFlag="-UseModernBuildSystem=0"
but got the same error. Im using Xcode 10.1 and Cordova 8.1.2
Posts: 1
Participants: 1
How to change position of slider pagination bullets?
@demokumar wrote:
in my ionic android app I use ion-slider on two pages and on the first page I want to place those bullets at the center of the page and on another page in place that bullets on the image which is inside slider my issue is if I set:
ion-slides div.swiper-pagination {
top:335px ;}
then this position is set for both
Posts: 1
Participants: 1
Ion-select and IE11
@richardshergold wrote:
I realise IE is not officially supported but I’m trying to get my app working across browsers and we need to support IE 11. One issue is with the ion-select component. If you open the ion-select documentation page up in IE you will see that the selection options appear ok but the selected item is then truncated and not fully displayed. Does anyone know of an easy css fix for this?
Posts: 2
Participants: 1
V3 to v4 migration done - performance degraded
@JerryBels wrote:
Hi,
So I just spent every night for two weeks to migrate my app from V3 to V4. I have mixed feelings about this… And wonder if I need to tweak some more things.
Because right now, the performance has been really degraded from v3 to v4 ! I mean :
Total boot time
v3 : 6s
v4 : 10shot reload with
serve
v3 : 2 - 3s
v4 : 12 - 15s
(I saw many recommandations regarding this issue, to go and install Node v10 for example… Will try it out tonight)Loading my biggest page (.ts file is approx. 450 lines)
v3 : ~2s
v4 : ~5s !!!Add to this, overall performance feels more sluggish. For example, going from
tab1
totab2
has a small delay that feels a little slower than v3. Also, elements in the page that triggers navigation seems to take a little more time before triggering -ion-button
orion-fab-button
don’t needtappable
property, right ?So, it was not hard to migrate but a real hassle, as it was expected - but I did it in good faith, thinking I would improve my app performances. Either I was wrong to think this, or there are some more things to do in order to obtain the desired result - in case it should be documented in the migrating guide ( I followed every step and every single point of the
Breaking changes
.)Now, let’s ask some questions with some code !
app-routing.module.ts :
const routes: Routes = [ { path: '', loadChildren: './tabs/tabs.module#TabsPageModule' }, { path: 'home', loadChildren: './pages/home/home.module#HomePageModule' }, { path: 'detail/:id', loadChildren: './pages/detail/detail.module#DetailPageModule' }, ..... ]; @NgModule({ imports: [RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })], exports: [RouterModule] }) export class AppRoutingModule {}
First things first, could
PreloadAllModules
be one of the problematic points ? In Ionic v3 I wasn’t using Lazy Loading much, only for a few pages, so I decided to follow recommandations when migrating and everything is lazy loaded now if I did things right - but I told myself,PreloadAllModules
should be the right bet to get both faster boot time and still good performance when opening a page.tabs.router.module.ts :
const routes: Routes = [ { path: 'app', component: TabsPage, children: [ { path: 'home', children: [ { path: '', loadChildren: '../pages/home/home.module#HomePageModule' } ] }, { path: 'my-list', children: [ { path: '', loadChildren: '../pages/my-list/my-list.module#MyListPageModule' } ] }, { path: 'actions', children: [ { path: '', loadChildren: '../pages/actions/actions.module#ActionsPageModule' } ] }, { path: '', redirectTo: '/app/home', pathMatch: 'full' } ] }, { path: '', redirectTo: '/app/home', pathMatch: 'full' } ]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] }) export class TabsPageRoutingModule {}
This routing is imported to be used used by
TabsPageModule
. I know what you could say - “you should add children to your tabs so the navigation stack works.”. The format is just like I want it - having main pages in tabs but when navigating to another page, falling back to the main router. It works… It’s just slow.The rest of the app is mostly the same as it was in V3 - except I took a lot of time to migrate my scss to css4 variables, which in fact reduced my overall custom styles.
I would take any advice on how to test and check what is causing the app to slow down as well.
Thanks and good luck !
Posts: 1
Participants: 1
Optical character recognition plugins for Ionic Framework
@krishna12 wrote:
I’m currently working on project supply chain management,working with Ionic Framework, there is typical task where I’m struggling to extract text from the image , is there any option of optical character recognition plugins for Ionic Framework , watched a few videos concerning OCR implementation in you tube for extracting text from the images clicked or videos captured and tried in your application ,but problem arrived is regarding time.Its taking to much time parse data from the image , plugin we are using is google tesseract and abbyy ocr plugins. Looking for better plugin or standard to extract the text in minimal time may in 5 seconds and accurate text .
Plugin Name : cordova-plugin-tesseract -ocr
Posts: 1
Participants: 1
Issue with Provider and Promise
@Dunny wrote:
Hi,
So I need to get a response from a provider that calls a promise,
My component which is never returned a response,
this.printerService.printBluetoothLowEnergy(template).subscribe(function(response) { console.log(response); });
and my provider,
return window.cordova.plugin.zebraprinter.print(address, join, function(success) { return true; }, function(fail) { return false; } );
Any help appreciated.
Posts: 1
Participants: 1
[Ionic V4] Modal with navigation in Angular 7
@Eduardgutierrez wrote:
I can’t find how to make a Modal with a navigation to push different detail pages.
I’m trying with Angular 7.
Any idea?Thanks.
Posts: 1
Participants: 1
Ionic 3 keyboard issues
@1Abhinavmaurya2 wrote:
while focus on ion input field keyboard overlap the input filed how to solve anyone help me out
Posts: 1
Participants: 1
Ftp.download(...) problem
@silverwings wrote:
Hi,
i have this problem with FTP native in ionic 3 return this error with “ionic serve”
Property ‘then’ does not exist on type ‘Observable’.
In the simulator a i have this alert “this.fTP.download(…).then is not a function”this is my code:
this.fTP.download(this.file.externalDataDirectory+‘download/’+nome, url)
.then((resDL: any)=>
console.log(‘ola’)
)
.catch((error: any) => {
console.error(error);
})thanks.
Posts: 1
Participants: 1
How to group by some value in io-list?
@sedar wrote:
<ion-list *ngFor="let obj of data; let i=index"> <ion-item-sliding> <ion-item> <div>UT_TXN_CODE: {{obj.UT_TXN_CODE}}</div> <br>Date {{obj.UT_LOG_DATE}} <br>Subject : {{obj.UT_SUBJECT}} <br>UT_LINK: {{obj.UT_LINK}} </ion-item> <ion-item-options side="right"> <button ion-button color="secondary"> <ion-icon name="checkmark"></ion-icon> Approve </button> <button ion-button color="blue"> <ion-icon name="checkmark"></ion-icon> Send For<br> Approval </button> </ion-item-options> </ion-item-sliding> </ion-list>
Posts: 1
Participants: 1
Is anybody work with offline app later sync with backend mysql
@indraraj26 wrote:
Title^^^
some of saying store api call in localstorage. since we all know localstorage is not safe to store data.
how can i achieve with sqlite and later sync my data to backend laravel api + mysqlThank you
Posts: 1
Participants: 1
How to display Ionic Tabs on all pages?
@Youtaka wrote:
I’m currently developing a mobile app with Ionic 4. I build it with Ionic CLI but I did a blank project. I created some component (like login, signup…) and after that, I added Tabs from Ionic.
My problem is, Ionic Tabs are presents only on pages in tabs.router.module.ts. How can I do to display Tabs on all pages ?
Except them, every component are in app-routing.module.ts, I tried to cut and paste them in tabs.router.module.ts but I’m not sure that’s a good thing to do.
tabs.routes.module.ts
const routes: Routes = [ { path: 'tabs', component: TabsPage, children: [ { path: 'home', children: [ { path: '', loadChildren: '../home-page/tab1.module#HomePageModule' } ] }, { path: 'game/new', children: [ { path: '', loadChildren: '../game/create-game-page/tab2.module#CreateGamePageModule' } ] }, { path: '', redirectTo: '/tabs/home', pathMatch: 'full' } ] }, { path: '', redirectTo: '/tabs/home', pathMatch: 'full' } ];
I have another problem with my tabs. When I am on the tab1 page, the good icon is highlight, but it’s not working for the tab2 page.
Tab One: http://www.noelshack.com/2019-05-6-1549062619-capture.png
Tab Two: http://www.noelshack.com/2019-05-6-1549062619-capture2.png
tab1.module.ts
import { IonicModule } from '@ionic/angular'; import { RouterModule } from '@angular/router'; import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { HomePageComponent } from './home-page.component'; @NgModule({ imports: [ IonicModule, CommonModule, FormsModule, RouterModule.forChild([{ path: '', component: HomePageComponent }]) ], declarations: [HomePageComponent] }) export class HomePageModule {}
tab2.module.ts
import { IonicModule } from '@ionic/angular'; import { RouterModule } from '@angular/router'; import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { CreateGamePageComponent } from './create-game-page.component'; @NgModule({ imports: [ IonicModule, CommonModule, FormsModule, ReactiveFormsModule, RouterModule.forChild([{ path: '', component: CreateGamePageComponent }]) ], declarations: [CreateGamePageComponent] }) export class CreateGamePageModule {}
I have another and last problem with my Tabs. I have a header I loaded in app.component.html like this :
<ion-app> <app-header></app-header> <ion-router-outlet></ion-router-outlet> </ion-app>
But as you can see on screens before, the header is not visible…
For the moment my Tabs works, but I’m not sure to understand how they perfectly work. Thank you for your help.
Posts: 1
Participants: 1
Problem importing Facebook
@JulioNicolasPapp wrote:
Hello everyone, thanks to read my problem, i have a problem in App.Module.ts, I can’t import in my App.module.ts “Facebook” and I don’t know what.
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouteReuseStrategy } from '@angular/router'; import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; import { SplashScreen } from '@ionic-native/splash-screen/ngx'; import { StatusBar } from '@ionic-native/status-bar/ngx'; import { HttpModule } from '@angular/http'; import { Facebook, FacebookLoginResponse } from '@ionic-native/facebook'; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app-routing.module'; @NgModule({ declarations: [AppComponent], entryComponents: [], imports: [ BrowserModule, IonicModule.forRoot(), AppRoutingModule, HttpModule ], providers: [ StatusBar, SplashScreen, Facebook, (HERE THE ERROR) { provide: RouteReuseStrategy, useClass: IonicRouteStrategy } ], bootstrap: [AppComponent] }) export class AppModule {}
When i do this, console says :
“Invalid provider for the NgModule ‘AppModule’ - only instances of Provider and Type are allowed, got: [StatusBar, SplashScreen, ?[object Object]?, …]”
If I delete “Facebook” from app.module.ts console says:
BlockquoteError: StaticInjectorError(AppModule)[HomePage -> Facebook]
¿How can i solve the problem? ¡¡Thanks again!!
Ionic:
ionic (Ionic CLI) : 4.9.0
Ionic Framework : @ionic/angular 4.0.0
@angular-devkit/build-angular : 0.12.3
@angular-devkit/schematics : 7.2.3
@angular/cli : 7.2.3
@ionic/angular-toolkit : 1.2.3Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.2, (and 4 other plugins)System:
NodeJS : v8.10.0 (/usr/bin/node)
npm : 3.5.2
OS : Linux 4.15
Posts: 1
Participants: 1
Accept text from ionic input button
@akhilkathi97 wrote:
i am using ionic 4 and I want to accept text from ion input button and show it in form of cards after accepting it.
Posts: 1
Participants: 1
Inappbrowser ExecuteScript Return on Button Click
@thesourav wrote:
I want to return some values from my Inappbrowser. So, i have a form with a Submit Button. I have added code on the click of the Submit Button which works inside the code( The alert statement works) but it is returning null to the callback function.
var code3 = "(function(){" + "var result = null;" + "document.getElementById('submitButton').onclick = function(){" + "alert(document.getElementById('userNameInput').value);" + //The alert statement works "result = document.getElementById('userNameInput').value;" + "return result;" + "Login.submitLoginRequest();" + "}" + "})();"; function loadStartCallBack(params) { console.log("loadStart Params", params); inAppBrowserRef.executeScript({ code: code3 }, function(results) { console.log("LoadstartResults", results); //Results is Null }); // } } function loadStopCallBack(params){ console.log("loadStopCallBack",params); inAppBrowserRef.executeScript({ code: code3 }, function(results) { console.log("LoadStopResults", results); //Results is Null } ); inAppBrowserRef.show(); } function loadErrorCallBack(params){ console.log("loadErrorCallBack",params); }
Posts: 1
Participants: 1