你好,我在离子2应用程序中有一些页面,里面有一个..像这样
<ion-content padding>
<p>Some text here....</p>
<p>Some other text here...</p>
<ion-img width="180" height="180" src="assets/images/goal.jpg"></ion-img>
<p>bottom text here...</p>
</ion-content>
Run Code Online (Sandbox Code Playgroud)
我需要看到图像水平居中..我已经测试了一些css但没有运气..我怎么能实现这一点?
我真的需要你的帮助.我正在尝试检测我的Ionic 2移动应用程序上是否存在互联网连接.我需要随时知道移动设备是否丢失连接以及何时恢复连接,如果有wifi连接..所以观察者和网络Cordova插件的wifi检测,只是做我需要的实现,我在页面构造函数中有两个使用者(用于连接和断开连接)来设置我在页面逻辑中使用的布尔实例变量.这是我的代码
app.component.ts
import { NgModule, ErrorHandler } from '@angular/core';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { Geolocation } from '@ionic-native/geolocation';
import { Network } from '@ionic-native/network';
//import { Network } from 'ionic-native';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
@NgModule({
declarations: [
MyApp,
HomePage
],
imports: [
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage
],
providers: [
StatusBar, …Run Code Online (Sandbox Code Playgroud)