ionic3

The keyboard pushes a div up & out of the screen

百般思念 提交于 2019-12-23 02:33:00
问题 I'm using Ionic 3 to make a website which will be part of another native app in a webview so I don't user cordova or any native plugins. I have a form with an embedded Google Map View above the elements and here is my HTML : <div style="height: 40%; width: 100%"> <div id="map_loader" *ngIf="showMapLoader"> <div class="sk-wave"> <div class="sk-rect sk-rect1"></div> <div class="sk-rect sk-rect2"></div> <div class="sk-rect sk-rect3"></div> <div class="sk-rect sk-rect4"></div> <div class="sk-rect

Center and crop image with CSS

不打扰是莪最后的温柔 提交于 2019-12-23 02:29:12
问题 I need to Center and crop image with CSS. I have followed this article.But device UI output is somewhat different. Can you explain the behavior of this? This is the use case: We don’t want to actually crop - just display the middle of the image. Some of the docs people will upload will be docs so don’t want this to be stretched. My question is I don't know why it transforms ( 1 image) landscape mode even though I got the image using portrait mode? Any explanation? photo { .photo { position:

setRoot for Tab pages in Ionic 2+

岁酱吖の 提交于 2019-12-23 01:12:05
问题 I have two maps. Each map is on its own view. I am using tabs to jump from view to view. However, when I use this method of navigation, the root is not being set and the page is not being pushed or popped or set once it has been visited. This is an issue with the google maps I am using. This functionality doesn't seem to take place when I am using a regular menu with set root in the menu area. Please Help. Thanks. tabs.html <ion-tabs> <ion-tab [root]="tab1Root" [tabTitle]="tab1Title"></ion

Cannot find namespace 'google' in ionic 3 app

血红的双手。 提交于 2019-12-22 17:57:11
问题 can anyone help me with this error im getting in my ionic 3 application after my attempt to use google variable in my project, npm install --save @types/google-maps which added the following to my package.json: "@types/google-maps": "^3.2.0", i also did declare declare var google; and did typings install dt~google.maps --global then i seen this soultion and tried it but that did not work either (notice i generated an ios key and android key) tried this Cannot find namespace 'google' ionic

Ionic get Active Page

ぃ、小莉子 提交于 2019-12-22 14:59:08
问题 I am using Ionic 3 and want to get the name of the active page in order to identify which page I am on in an event subscription. When I am on a page, the following works: this.nav.getActive().name However, if my root is tabs and I want to identify the page loaded in a tab, the above code just returns the tab page name and not the active page. Question How do I get the active page name or identifier if it is loaded in a tab? 回答1: You can get the component of the page. Like this this.nav

Ionic 3 deep-linking and lazy-loading at the same time

本小妞迷上赌 提交于 2019-12-22 10:39:46
问题 According to what I've read in the documentation and forums, you enable deep-linking via : forRoot(appRoot, config, deepLinkConfig) @ngModule({ .. IonicModule.forRoot(MyApp, {}, { links:[{ component: ContactPage, name: "contact", segment: "contact"}, { component: HelloPage, name: "hello", segment: "hello" } ] }) ... }) ... This leads to adding ContactPage and HelloPage to declarations and entryComponents arrays within @ngModule , which would not be lazy-loaded. So, this leads to the question,

Tabs disappears ionic 3 after push

自作多情 提交于 2019-12-22 10:36:17
问题 My Tabs disappears after using this.navCtrl.push(NamePage); I don't understand, I need use @ViewChild or another function? I have set tabsHideOnSubPages on false in app.module.ts Example : https://github.com/Nicolas-PL/TestMenu Files is : src/pages/tabs/tabs.ts and src/pages/test/test.ts import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { AboutPage } from '../about/about'; import { ContactPage } from '../contact/contact'; import { HomePage } from

ionic cordova : how to display an image in img tag from android gallery when i get content:// url from filechooser plugin

江枫思渺然 提交于 2019-12-22 09:57:09
问题 i wasted 6 days (and counting) struggling to display an image from gallery on android using ionic3-cordova this.fileChooser.open() .then((uri) => { console.log('image uri is', uri); }) i cannot use uri directly to bind to my tag's src i tried to use another plugin and get a file entry return this.file.resolveLocalFilesystemUrl(uri); i cannot use that either... unsafe uri! then i used this.domSanitizer.bypassSecurityTrustUrl(entry.toInternalURL()); and i cannot use that either to bind to img

Ionic 2 Android Build Prod Warning while verifying jar signing

為{幸葍}努か 提交于 2019-12-22 08:48:51
问题 I am getting an error while building my Ionic application, it occurs on a new app (which I started from the scratch couple of days ago). None of my old apps have this issue. The issue does not occur in any of older apps i.e., apps that are 4-5 months old. WARNING: META-INF/android.arch.lifecycle_runtime.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/. and it continues for 4-5 more files. My

How to focus ion-searchbar on button click

…衆ロ難τιáo~ 提交于 2019-12-22 08:12:44
问题 I am trying to focus ion-searchbar on button click but it is not working. This is my code Typescript @ViewChild('search') search:ElementRef; focusButton(){ console.log(this.search); //Searchbar {_config: Config, _elementRef: ElementRef, _renderer: RendererAdapter, _componentName: "searchbar", _mode: "md", …} console.log(this.search.nativeElement); // null this.search.nativeElement.focus(); // Cannot read property 'focus' of undefined this.search.nativeElement.setFocus(); // Cannot read