i mean ,i am searching tools for build window app without installed vs.
Build ionic ipa on windows using tools to connect with mac
DOM not modified by var
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
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()
DOM not modified by var
Only because "function" ? WTF!
DOM not modified by var
No, not wtf. Just basic es6 scoping with this
LocalStorage and click counts
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
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
Thanks my friend! You are welcome!
Issue with app boot time
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
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
Ionic build x86 or armv7 (Error Mismatch of cpu architecture)
what should I do @luukschoen
Change button icon when clicking on the button
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
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
Ok now it downloaded and project now up and running
Thanks
Please help how to use directive in innerHTML
i don't know how to fix my problem. ionic-img-viewer need directive but innerHTML disable.
Position cursor in textarea
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
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
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
Change android back button behavior (not to leave the application)
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.