Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 230381 articles
Browse latest View live

Build ionic ipa on windows using tools to connect with mac

$
0
0

i mean ,i am searching tools for build window app without installed vs.


DOM not modified by var

$
0
0

In any case, don't use oldschool functions. You will loose scope of this.

public temporizador(){
    let counter = 0;
    let timer = setInterval( () => {
        if( counter >= 10 ) {
          clearInterval( timer );
        }

        this.tempo = counter;
        console.log(this.tempo);
        console.log( counter);
        counter++;
    }, 1000);
  }

Issue with app boot time

$
0
0

Try to override your config.xml preferences about splashscreen with the ones i share here and check if you have in your app component file the splashscreen.hide() :wink:

DOM not modified by var

DOM not modified by var

$
0
0

No, not wtf. Just basic es6 scoping with this :wink:

LocalStorage and click counts

$
0
0

page html :

        <button ng-click="count();">clic</button>

page js :


function count() { localStorage.setItem("nbclic",localStorage.getItem("nbclic")+1) ; }

Something like that on ionic v1.

Videogular 2 Doesn't work with layz loading

$
0
0

Hi,

Trying to use videogular with ionic. Basicaly fallowed these steps:

It works fine with ionic 2 but when trying with Ionic 3 lazy loading it gives me below error:

Runtime Error
Uncaught (in promise): Error: Template parse errors: Can't bind to 'vgMedia' since it isn't a known property of 'video'. (" <video #media [ERROR ->][vgMedia]="media" id="singleVideo" preload="auto" controls> <source src="http://stati"): ng:///MyPageModule/MyPage.html@56:26 'vg-player' is not a known element: 1. If 'vg-player' is an Angular component, then verify that it is part of this module. 2. If 'vg-player' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. (" [ERROR ->] <video #media [vgMedia]="media" id="singleVideo" preload="auto" controls> "): ng:///MyPageModule/MyPage.html@55:8 Error: Template parse errors: Can't bind to 'vgMedia' since it isn't a known property of 'video'. (" <video #media [ERROR ->][vgMedia]="media" id="singleVideo" preload="auto" controls> <source src="http://stati"): ng:///MyPageModule/MyPage.html@56:26 'vg-player' is not a known element: 1. If 'vg-player' is an Angular component, then verify that it is part of this module. 2. If 'vg-player' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. (" [ERROR ->] <video #media [vgMedia]="media" id="singleVideo" preload="auto" controls> "): ng:///MyPageModule/MyPage.html@55:8 at syntaxError (http://localhost:8101/build/main.js:77927:34) at TemplateParser.parse (http://localhost:8101/build/main.js:88418:19) at JitCompiler.compileTemplate (http://localhost:8101/build/main.js:102169:39) at http://localhost:8101/build/main.js:102093:62 at Set.forEach (native) at JitCompiler.compileComponents (http://localhost:8101/build/main.js:102093:19) at createResult (http://localhost:8101/build/main.js:101978:19) at t.invoke (http://localhost:8101/build/polyfills.js:3:8971) at Object.onInvoke (http://localhost:8101/build/main.js:4510:37) at t.invoke (http://localhost:8101/build/polyfills.js:3:8911)

DOM not modified by var

$
0
0

Thanks my friend! You are welcome!


Issue with app boot time

$
0
0

A production build will drastically bring back your boot time, so that might be enough in your case. If you want fine grained control (not autohide the splashscreen after three seconds, but when you're app is ready for it), use @fdom 's approach to hide the splashscreen when the app is ready to do so.

Overall try to keep the boot time to a minimum for a better user experience.

Ionic form validate from code, remove ng-untouched

$
0
0

Hi, there is a lot of error in your code.

For example on your template if you are using Reactive Forms you dont need the ngModel directive.
Another thing, here is the way you should create a form:

    this.itemForm = new FormGroup({
        'name': new FormControl('', [Validators.required,
                                     Validators.maxLength(20),
                                     Validators.pattern('[A-Z][a-zA-Z]*')]),
        'quantity': new FormControl('', [Validators.required, QuantityValidator.isValid])
    });

And with this input:

      <ion-item>
        <ion-label>{{ 'Modal.ItemModal.name-label' | translate }}</ion-label>
        <ion-input formControlName="name" placeholder="{{item?.title}}" type="text"></ion-input>
      </ion-item>

I got my input with red color if its not filled and i can show error messages like this:

      <div *ngIf="!itemForm.get('name').valid && itemForm.get('name').touched">
        <p class="error-text" *ngIf="itemForm.get('name').errors['pattern']">
          {{ 'Validations.modal-name-pattern' | translate }}
        </p>
        <p class="error-text" *ngIf="itemForm.get('name').errors['required']">
          {{ 'Validations.modal-name-required' | translate }}
        </p>
      </div>

This is all working hope this help you :wink:

Ionic build x86 or armv7 (Error Mismatch of cpu architecture)

Change button icon when clicking on the button

$
0
0

I need to change icon of the button when clicking the button

test.ts

  isDisplayImage: boolean = false;
  isDisplayGen: boolean = false;
  isDisplayProd: boolean = false;


  displayImage() {
    this.isDisplayImage = !this.isDisplayImage;
    this.isDisplayProd =false ;
    this.isDisplayGen =false ;
  }

test.html

 <button ion-button="photo" style=" margin-right: 8px ;  margin-left:  15px;" (click)="displayImage()">
    <ion-icon name="md-add"> Photo</ion-icon>
</button>

Navigation pop

$
0
0

Thank @HugoPetla,

But i couldn't dismiss alert box,

even i have tried to dismiss but i couldn't get success.

Ionic creating empty projects

$
0
0

Ok now it downloaded and project now up and running
Thanks

Please help how to use directive in innerHTML

$
0
0

i don't know how to fix my problem. ionic-img-viewer need directive but innerHTML disable.


Position cursor in textarea

$
0
0

hi @zeta

to prevent the keyboard close you can do the following:
(click)="$event.preventDefault();"
add this to every element you can click
and add this to your text area contenteditable="true"
and try out to use text area with custom CSS instead of ion-textarea

Issue with app boot time

$
0
0

The 10 second white screen leads me to believe it's less of a splash screen hiding issue, and more of a on load processing issue. What are you doing when the app loads?

How to call the two function for the ON and OFF for the toggle button

$
0
0

What's the point ? Why you don't call a function that will handle both cases and call the good function ?
So you just have to ng-model your toggle button

Help, Error update ionic CLI 3.5.0

$
0
0

I generated a new project and update it as ionic cli suggests, but now it generates errors in any simple command like the generate g page,

whats going on with ionic?

Change android back button behavior (not to leave the application)

$
0
0

When I press back button in Android device and then try to open my app from already open apps. My app then reloads again. And because loading is really slow for Ionic apps (7 s min ) It harms the UX. So I want to change back button behavior to not quit the application, just hide it.

Viewing all 230381 articles
Browse latest View live


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