ionic-framework

How do you “Swipe to go back” in Ionic?

不羁的心 提交于 2020-01-15 15:30:47
问题 There's nothing in the docs about this. I've just read a blog post on ionics website saying that it's possible to swipe to go back (like ios7) and I've seen the latest ng-conf where they talked about it as well, but nowhere to they mention on how to implement the damn thing. 回答1: No need to do a on-swipe-left. The latest version of Ionic provides this, and is defaults to true. As for using this feature, you need to create multiple views, and then just swipe from left, it will take you back to

How do you “Swipe to go back” in Ionic?

眉间皱痕 提交于 2020-01-15 15:30:15
问题 There's nothing in the docs about this. I've just read a blog post on ionics website saying that it's possible to swipe to go back (like ios7) and I've seen the latest ng-conf where they talked about it as well, but nowhere to they mention on how to implement the damn thing. 回答1: No need to do a on-swipe-left. The latest version of Ionic provides this, and is defaults to true. As for using this feature, you need to create multiple views, and then just swipe from left, it will take you back to

How do I change the color of an active ionic tab?

吃可爱长大的小学妹 提交于 2020-01-15 14:17:32
问题 I am trying to change the background color of an active ionic tab from white to green. I found this thread but it seems like the answer doesn't work anymore: https://forum.ionicframework.com/t/change-color-of-active-state-in-tab-icons/12547 Does anybody know how to do this? Thanks. 回答1: add style to .tab-item-active class like this .tab-item-active { background:green; } see this codepen:http://codepen.io/edisonpappi/pen/aWvmjz 回答2: For me, setting the CSS rules for the class ".activated"

Mocking out NavParams in Ionic3 gives back Property Data is missing in type typeOf NavParams

拈花ヽ惹草 提交于 2020-01-15 11:04:34
问题 export class NavParamsMock { static returnParam = null; public get(key): any { if (NavParamsMock.returnParam) { return NavParamsMock.returnParam } return 'default'; } static setParams(value){ NavParamsMock.returnParam = value; } } It's not working. 回答1: As the error notes the data is missing from your class so it fails. If you don't care and want to avoid these kind of errors then extend your class. export class NavParamsMock extends NavParams This will fill in the missing properties. If you

Mocking out NavParams in Ionic3 gives back Property Data is missing in type typeOf NavParams

旧城冷巷雨未停 提交于 2020-01-15 11:04:17
问题 export class NavParamsMock { static returnParam = null; public get(key): any { if (NavParamsMock.returnParam) { return NavParamsMock.returnParam } return 'default'; } static setParams(value){ NavParamsMock.returnParam = value; } } It's not working. 回答1: As the error notes the data is missing from your class so it fails. If you don't care and want to avoid these kind of errors then extend your class. export class NavParamsMock extends NavParams This will fill in the missing properties. If you

Can I call Ionic 4 / Capacitor Electron code from the Ionic part of the application?

扶醉桌前 提交于 2020-01-15 10:14:37
问题 I am investigating using Ionic 4/ Capacitor to target Windows via the Electron option, for an application where I want to use SQLite. Using the Ionic Native SQLite plugin, which wraps this Cordova plugin, out of the box, as far as I can see, the Windows support is for UWP, and not Desktop, which runs using Electron in Ionic Capacitor wrapper. My plan, was to see if I could use Electron SQLite package, and then call this from my Ionic application by making a wrapper class for the Ionic native

Ionic with AngularJS - SyntaxError: Unexpected token [

拥有回忆 提交于 2020-01-15 09:51:34
问题 I'm trying to follow this tutorial: https://scotch.io/tutorials/create-your-first-mobile-app-with-angularjs-and-ionic#toc-making-a-todo-app and when I type ionic -v or just ionic it is giving me this error: AppData\Roaming\npm\node_modules\ionic\dist\index.js:24 const [xcode, iosDeploy, iosSim,] = yield Promise.all([ ^ Io at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:387:25) at Object.Module._extensions..js (module.js:422:10) at Module.load (module.js:357:32) at

Ionic with AngularJS - SyntaxError: Unexpected token [

白昼怎懂夜的黑 提交于 2020-01-15 09:51:13
问题 I'm trying to follow this tutorial: https://scotch.io/tutorials/create-your-first-mobile-app-with-angularjs-and-ionic#toc-making-a-todo-app and when I type ionic -v or just ionic it is giving me this error: AppData\Roaming\npm\node_modules\ionic\dist\index.js:24 const [xcode, iosDeploy, iosSim,] = yield Promise.all([ ^ Io at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:387:25) at Object.Module._extensions..js (module.js:422:10) at Module.load (module.js:357:32) at

Ionic Initial Loading Time

淺唱寂寞╮ 提交于 2020-01-15 09:24:47
问题 I am building a simple app with Ionic. But my app has a performance issue with initial loading time on cold start. Here is what I have done: collection-repeat instead of ng-repeat with 'track by' native scroll: overflow-scroll='true' use no cache with $ionicConfigProvider.views.maxCache(0); I cannot use crosswalk-webview because of one of the library I am using. I feel like all I have done is to improve ionic performance that is not really related with initial loading. Any advice or

SVG and ng-bind-html is not working on IOS using Ionic Framework

谁都会走 提交于 2020-01-15 09:02:56
问题 I am struggling to get my little ionic app to show an SVG file in IOS using the IonicFramework. It works in the browser and also on Android 5.0 but when I try it out in IOS my flag does not appear. If i add the flag hardcoded into the html the flag appears as it should... Hmm what am i doing wrong?? The example is based on a new Ionic project using the blank template... JS snippet: .controller('myCtrl', function($scope) { var flag='<polygon points="0 0,0 60,120 40,120 20" fill="white" />