Unit test controller

Issue I make an ionic app and it finish but when i start to add tests to it I face a problem with $resources ,in this case I have this Controller : .controller(‘newAccountCtrl’, function($scope, $window, $rootScope, API, $ionicPopup, $state) {

Continue reading

ion-nav-bar ng-class not styling

Issue <ion-nav-bar ng-class=”{‘bar-positive’: isAndroid, ‘bar-stable’: !isAndroid}”> </ion-nav-bar> <ion-tabs ng-class=”{‘tabs-positive’: isAndroid, ‘tabs-icon-top’: true}”> <!– Account Tab –> <ion-tab title=”Account” icon=”ion-ios7-gear” href=”#/tab/account”> <ion-nav-view name=”tab-account”></ion-nav-view> </ion-tab> </ion-tabs> When I use the following markup, only the ion-tabs is styled – not the ion-nav-bar. How

Continue reading

Ionic 4 ion-slides change css style of the active slide using ngClass

Issue EDIT: adding a stackblitz: https://stackblitz.com/edit/ionic-b2r7si I am using ion-slides as following: <ion-slides class=”fullWidth” [options]=”slideOptsOne” #slideWithNav (ionSlideDidChange)=”change($event)”> <ion-slide #status *ngFor=”let array of arrays”> <ion-col> {{array}} </ion-col> </ion-slide> </ion-slides> I need to change the css style of the current active slide,

Continue reading

How to ngSwitchCase in ngFor?

Issue From example in my code. tabs: object = [ { key: ‘tab1’, value: ‘tab1’ }, { key: ‘tab2’, value: ‘tab2’ }, { key: ‘tab3’, value: ‘tab3’ }, ]; <div [ngSwitch]=”my_tab”> <div *ngFor=”let tab of tabs” *ngSwitchCase=”‘{{ tab.key }}'”> {{

Continue reading

Angular2 ng2-popover hide() is not working

Issue app.module.ts import { PopoverModule } from ‘ng2-popover’; @NgModule({ declarations: [ …], imports: [PopoverModule], providers: [] }) example.html <a [popover]=”customPopover” [popoverOnHover]=”true” [popoverCloseOnMouseOutside]=”true” href=”www.google.com” (click)=”$event.stopPropagation()” target=”_blank”>{{name}}</a> <!–Popover content –> <popover-content #customPopover title=”{{name}}” placement=”right” [closeOnClickOutside]=”true” [closeOnMouseOutside]=”true”> <span class=”popoverDesc”>{{description}}</span><br /><br /> <a href=”{{websiteLink

Continue reading

MBProgressHud.h file not found

Issue I have download MBProgressHUD.m and MBProgressHUD.h file from github and Placed under a folder Classes->MBprogressHub->then both files Now i have include this file under Share Extension import "MBProgressHUD.h". When i an trying to build an app. it is giving

Continue reading

Angular ngx-translate inside service

Issue I am using ngx-translate and ngx-translate/http-loader for translating my ionic/angular project. I have this code inside app.module.ts imports: TranslateModule.forRoot({ loader: { provide: TranslateLoader, useFactory: (createTranslateLoader), deps: [HttpBackend] } }) and this loader function in the same file: export function

Continue reading

Ignore periods and commas of RegExp

Issue I have a RegExp like so: const keywordsClone = […alert?.keywords]; keywordsClone.sort((a, b) => (a.length > b.length ? -1 : 1)); let transcript = alert?.transcript; forEach(keywordsClone, (k) => { const regExpression = new RegExp(`(${k})`, ‘ig’); //now it has exact match

Continue reading

Displaying time in <ion-range>

Issue I’m new to Ionic, and I’m attempting to display the time as 24 hours from 00:00 to 23:00, with the user able to select a time period. <ion-range min="00:00" max="23:00" step="00:01" dualKnobs="true" pin="true" [(ngModel)] ="knobValues" > <ion-label slot="start">0:00</ion-label> <ion-label

Continue reading

Having an 'SyntaxError: Unexpected token 'export' Issue with my Electron-Ionic Application

Issue //Having this issue and I don’t know how to solve it: Uncaught C:\Users\Zac\ionic_projects\robot-backup-4\node_modules\@ionic\core\components\index.js:4 export { setAssetPath, setPlatformOptions } from ‘@stencil/core/internal/client’; ^^^^^^ SyntaxError: Unexpected token ‘export’ at new Script (vm.js:101:7) at createScript (vm.js:262:10) at Object.runInThisContext (vm.js:310:10) at wrapSafe (internal/modules/cjs/loader.js:979:15) at

Continue reading

Why ion-icon is not showing in ionic vue project?

Issue I am trying to add icon with ion-icon in my ionic vue project. I copied code from official page <ion-icon name="aperture-outline"></ion-icon> here is my template <template> <ion-content class="content"> <h1>Hello</h1> <ion-icon name="aperture-outline"></ion-icon> <h1>Hello2</h1> </ion-content> </template> <style scoped> .content { –color:

Continue reading

How to position a button at the bottom of a slide – Ionic

Issue I have the following slides of images: <ion-slides style="margin-top: 30px; margin-bottom: 30px" pager="true" [options]="slideOpts"> <ion-slide *ngFor="let image of imageURLs"> <div (click)="openZoomedImage(image.fullURL)"> <img [src]="image.fullURL" alt=”slide-1”/> </div> <ion-button size="small" color="danger" (click)="deleteImage(image.imageName)">Delete</ion-button> </ion-slide> </ion-slides> However I am wondering how I can make

Continue reading

ionic 3 – show confirm alert after click on ion-toggle

Issue I’m trying to use click event on ion-toggle and is not working. Html: <ion-item> <ion-label class=”labelToggle”>Ativo:</ion-label> <ion-toggle (click)=”mudarStatusProcesso()” [(ngModel)]=”ProcAtivo”></ion-toggle> </ion-item> The mudarStatusProcesso() creates an AlertController with ‘ok’ and ‘cancel’ options, this action needs happen before ion-toggle updating. I believe

Continue reading

I can't access the group attribute of FormBuilder on my reactive form

Issue Property ‘group’ does not exist on type ‘typeof FormBuilder’ here is the code  import { FormBuilder, FormGroup, Validators } from ‘@angular/forms’; export class LoginPageForm{ constructor(private formBuilder = FormBuilder){} createForm(): FormGroup{ return this.formBuilder.group({ email: [”, [Validators.required]], password: [”, [Validators.required]] }); } } Solution

Continue reading

Get parameters passed by url in ionic 5

Issue I have passed parameters in URL to my ionic application http://localhost:8100/welcompage/overview?brand=bmw I am using ActivatedRoute to retreive the data passed as parameters in the URL constructor(private route: ActivatedRoute) { } ngOnInit() { this.route.params.subscribe(params => { console.log(params[‘brand’]); }); } the

Continue reading