超文本标记语言
<ion-item>
<ion-label>Popover</ion-label>
<ion-select [interfaceOptions]="customPopoverOptions" interface="popover" placeholder="Select One">
<ion-select-option value="brown" text-wrap>Brownasdfasdfasdfasdfadfadsfasdfadfasdfafdsadfaf</ion-select-option>
<ion-select-option value="blonde">Blonde</ion-select-option>
<ion-select-option value="black">Black</ion-select-option>
<ion-select-option value="red">Red</ion-select-option>
</ion-select>
</ion-item>
Run Code Online (Sandbox Code Playgroud)
SAS:
ion-select-option{
ion-label{
white-space: normal !important;
}
}
Run Code Online (Sandbox Code Playgroud)
我无法覆盖现有的
white-space: nowrap我想知道如何覆盖shadow-dom css
我想在ionic2中尝试beta11到rc0.
我的一个页面有自定义标签作为peg 更改日志我试图更新我的自定义标签和页面按照第7点解释
将每个自定义组件和管道导入并添加到src/app/app.module.ts中的声明数组中.
我已将componentTags.ts文件移至src并查看了我的文件 @NgModel
@NgModule({
declarations: [
MyApp,
LoginPage,
HomePage,
AboutUsPage,
PrivacyPolicyPage,
TermsOfUsePage,
ProductSubCategoryPage,
CategoryProductDetailsPage,
CategoryProductDetailsInfoPage,
//custom tags
QuantityComponent
],
imports: [
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
LoginPage,
HomePage,
AboutUsPage,
PrivacyPolicyPage,
TermsOfUsePage,
ProductSubCategoryPage,
CategoryProductDetailsPage,
CategoryProductDetailsInfoPage,
QuantityComponent
],
//directives: [QuantityComponent],
providers: [
Products,
Users,
Configurator,
Rest
]
Run Code Online (Sandbox Code Playgroud)
所以这是我的自定义组件文件,名为quantityTag.ts文件
import {Component, Input, Output, EventEmitter} from '@angular/core';
@Component({
selector: 'counter',
styles: [`
.quantity-input {
display:flex; align-items:center;
}
.quantity-input .input-width {
width:50px;
border: 1px solid #bdbdbd;
padding-top: 5px;
} …Run Code Online (Sandbox Code Playgroud) 您好如何避免离子选项中的确定和取消按钮?
我按照http://ionicframework.com/docs/v2/api/components/select/Select/尝试了所有选项.
然而,我无法实现这个ui.
即使打字后interface="action-sheet"我也无法实现想要的外观.
我在哪里可以找到演示或获得此视图的任何帮助?
点击此链接https://market.ionic.io/plugins/ionic-2-ion-numeric-keyboard
这里我有一个输入类型的一次性密码(OTP),如果用户使用相同的手机号码注册,那么插件将自动读取代码,如果用户使用不同的号码输入,那么他想要手动输入otp .i不知道如何拆分输入类型行.
以下是代码:
<ion-input type="number"
id="otpNumber"
class="form-control"
pattern="[0-9]{6}"
formControlName="otpNumber">
</ion-input>
Run Code Online (Sandbox Code Playgroud)
下面是我得到的屏幕截图:
下面是屏幕截图我应该得到什么:
如上图所示,如何获取4输入字段.
我正在尝试将一张基本地图加载到我的模板上.我只是按照这个指令https://ionicframework.com/docs/native/google-maps/来获取我的地图.
但我得到的错误就像上面的问题一样.
这是我的代码
// Load map only after view is initialized
ngAfterViewInit() {
this.loadMap();
}
loadMap() {
// make sure to create following structure in your view.html file
// and add a height (for example 100%) to it, else the map won't be visible
// <ion-content>
// <div #map id="map" style="height:100%;"></div>
// </ion-content>
// create a new map by passing HTMLElement
let element: HTMLElement = document.getElementById('map');
let map: GoogleMap = this.googleMaps.create(element);
// listen to MAP_READY event
// You …Run Code Online (Sandbox Code Playgroud) 如何从我的Ubuntu中完全删除Cordova和ionic 1及其依赖?如何重新安装所有?
要安装我的离子及其依赖,我使用这个博客https://www.thepolyglotdeveloper.com/2014/09/install-android-cordova-ionic-framework-ubuntu/
我试过npm uninstall -g cordova ionic但它不起作用
我收到这两个错误
npm WARN uninstall not installed in /home/gopi/node_modules: "cordova"
npm WARN uninstall not installed in /home/gopi/node_modules: "ionic"
Run Code Online (Sandbox Code Playgroud) 我在远程调试时遇到此错误:
ERROR: Plugin 'Device' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
ERROR: Plugin 'Statusbar' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml
Run Code Online (Sandbox Code Playgroud)
我在所有插件上都遇到这些错误,当我在设备和控制台面板上运行应用程序时会给出这些错误.以及如何在xcode上调试javascript?我对此一无所知.
我很困惑,因为这些错误,如果我正在点击其他插件的任何方法也有相同的上述错误,方法永远不会得到调用..
最初我的app.component.ts文件被加载然后我有两个变量,name并email从API获取调用更新,为了进行此api调用我需要用户名如果我没有用户名我将无法更新此名称和电子邮件.
一旦我获得了用户名,我就可以拨打api电话,但我的用户名只有在登录成功后才可用.
我的app.html有这个,下面的代码是我的sidemenu的一部分
<ion-item class="profile-info">
<ion-icon name="person" item-left></ion-icon>
<h2>{{name}}</h2>
<p class="se-email">{{email}}</p>
</ion-item>
Run Code Online (Sandbox Code Playgroud)
我的app.component.ts文件有这个
name
email
if(localStorage.getItem("username")){
//here it is invoking 2nd time because i have stored the username after login so no problem
this.getUserDetails();//this function call the same api
}else{
//at first thime i am not able update the name and email because i dont have username
//so i am trying to update the name with set and get method where it will return my data …Run Code Online (Sandbox Code Playgroud) 我对ionic 4项目使用了角路由(@ angular / router)以禁用ionic 4中的设备后退按钮prevent-default不起作用,下面是我的代码
app.component.ts
this.platform.backButton.subscribe(() => {
if (this.router.url === '/Login') {
this.util.presentAppExitAlert();
} else {
// event.preventDefault();
console.log("invoing url ", this.router.url);
}
});
});
Run Code Online (Sandbox Code Playgroud)
我无法在此处禁用设备后退按钮的任何帮助
angular ×6
ionic2 ×4
cordova ×3
ionic3 ×3
ionic4 ×2
javascript ×2
angularjs ×1
css ×1
google-maps ×1
ios ×1
ng-options ×1
node.js ×1
plugins ×1
shadow-dom ×1