草庐IT

ionic2Android

全部标签

javascript - 装载机中的 Ionic 2 自定义 svg 微调器

我正在尝试将我的SVG添加到加载创建函数中,但是当我去查看它时,我看到的只是一个空标签,它应该在该位置。letloading=this.loadingCtrl.create({spinner:'',content:this.appConfig.customSpinner})上面是我的创建代码,该变量是下面的SVG代码。.st2{fill:none;stroke-width:40;stroke-miterlimit:10;}我怎样才能让它渲染?我也已将它复制到ionic论坛上link我试图添加一个管道,使其在运行时安全,但也失败了。我制作的内容是这样的:这是我的pipe:import{P

javascript - 如何在后台运行 android phonegap 应用程序(关闭应用程序后)?

我已经在github(https://github.com/saileshmittal/phonegap-system-notification-plugin)中为androidphonegap使用了系统通知插件。我已经在我的index.html中使用了这段代码我的代码是:document.addEventListener("deviceready",onDeviceReady,false);functiononDeviceReady(){varnot_title='Message';varnot_text='Zouditwerken?';varnot_tText='Message';

javascript - ionic : ng-show and page transition

我正在使用Ionic开发移动应用程序,但我还不是很熟悉这个框架或Angular。您可以点击一些列表项以查看包含一些详细信息的页面。这是我的列表模板:{{location.name}}Controller:...$scope.showDetails=function(location){$rootScope.currentLocationDetails=location;};...这是详细信息页面:Controller:app.controller('DetailsController',function($scope,$rootScope){$scope.location=$rootS

javascript - angularjs 中的 ui-view 和 ionic 中的 ion-nav-view 有什么区别

如您所知,在Angularui-router中,我们使用ui-view将html呈现给父级html。根据this:js文件:$stateProvider.state('report',{views:{'filters':{...templatesand/orcontrollers...},'tabledata':{},'graph':{},}})同样在Ionic框架中我们可以使用这个:有什么区别? 最佳答案 这是自定义Ionic框架指令。您可以在此处找到详细说明ion-nav-view.它具有更多高级功能,如跟踪历史记录、转换等等。

javascript - ionic /如何从选择控件中选择多个选项(最多选择 3 个选项)?

我目前使用的是Ionic1.3.16版本。在这里,我需要在我的选择控件中选择多个选项。这是我的ionicHTML代码:LightsaberBlueGreenRed 最佳答案 您在select选项中缺少value属性,因为当您选择选项时,它将反射(reflect)到ng-model。此外选择多个,您需要在选择中添加multiple属性。标记{{option.name}}{{selectedValues}} 关于javascript-ionic/如何从选择控件中选择多个选项(最多选择3个选项

javascript - 如何动态地将数据插入 ionic 滑动框Angularjs Ionic

我正在使用Ionic框架和Angularjs构建一个新闻应用程序!我正在使用ng-repeat在ion-slide-box上展示新闻,这里是一个例子:{{i.name}}{{i.gender}}{{i.age}}我想为每张幻灯片动态地将数据插入到我的ionic幻灯片盒中,所以我正在使用此代码:$scope.slideHasChanged=function(index){$scope.items.push("{name:'John',age:25,gender:'boy'}");}但这似乎不太奏效,所以如果您对我如何重新喜欢它有想法那就太好了:)这里是CODEPEN+CODE

javascript - ionic 模态不显示

我的ionic模态视图不会显示。屏幕会以某种方式变灰,但不会显示模态。请问这是怎么回事这是我的代码:原图:ContactInfo{{contact.name}}{{contact.info}}模态:EditContactNameInfoDoneController:.controller('DashCtrl',function($scope,$ionicModal){$scope.contact={name:'MittensCat',info:'Tapanywhereonthecardtoopenthemodal'}$ionicModal.fromTemplateUrl('templa

javascript - 将 ViewChild 用于动态元素 - Angular 2 和 ionic 2

我想使用多个IonicSlides我动态添加的。但是我不能使用@viewChild。请提出解决此问题的方法。Template.html://somecode组件.ts:@ViewChild('slides')slides:QueryList;....ngAfterViewInit(){setTimeout(()=>{alert(this.slides.toArray());//thislineriseerror},3000);}错误:_this.slides.toArrayisnotafunction 最佳答案 使用@ViewChi

javascript - 在编辑模式下执行 CRUD 操作时选择 ionic 选择选项

我正在对多个字段执行CRUD操作。我对所有字段都有[(ngModel)]。Iamnotinterestedtochangedthenameofthe[(ngModel)]orassignanyvalueintheregister.tsoredituser.tsfilewhileloading.SinceIhavemadetheformtosavethevaluessuccessfullyintheregistermodetotheDB.IneedtoshowtheInsertedvalueintheEdituserFormandhowcaniperformthat.注意:我在两种表单中

Android开发:RecyclerView获取item位置的几种方法比较

一.前言        当使用RecyclerView来展示列表数据时,获取item的位置是一个常见的需求。RecyclerView提供了多种获取item位置的方法,包括getAdapterPosition()、getBindingAdapterPosition()、getAbsoluteAdapterPosition()等等。这些方法的实现原理和返回值有所不同,因此在实际使用时需要根据具体情况进行选择。本篇文章将针对RecyclerView中获取item位置的几种方法和使用场景进行介绍。二.正文在介绍相关方法之前,先了解两个概念:布局状态和绑定。item布局状态在RecyclerView中,