Quantcast
Viewing all 70863 articles
Browse latest View live

Go Back to previous view when user clicks on menu-element

@William_Wallace wrote:

Hello together,
this time I have a specific questions for the ionicHistory and the go-Back possibility.

What I want to do:
- I have multiple views (Start, Infos, ...). Inside those views are links to other views (with ui-sref). When I click on such an "inside"-link I get an back Button.

Now my special case:
- When I am in such an inside-view and open the menu, and click on a menu-element. I get to the next view, but there is no back button shown.

I know, that is caused bei the ui-sref and the ionicHistory-Stack. So I log the IonicHistory-Stack via viewHistory() and there is noch backView or something after the special case.

Does anybody has an idea how I can get that working?

I already find this here: https://forum.ionicframework.com/t/how-can-i-use-ionichistory-to-go-back-2-views/16176. But that wont work, because the view is not in the backView of the viewHistory-object.

Thanks for every suggestion.

My menu is build like this:

    <ion-item menu-close ui-sref="app.infos">
      <i class="iconion-ios-home"></i>
    </ion-item>

Posts: 1

Participants: 1

Read full topic


No Restart after file change. (ionic serve)

@philipphalder wrote:

Hello,

i got a strange error with Ionic2 and Ionic serve.

I start "ionic serve -cs"
Then I am working on my files and save them (Webstorm) and usually "ionic serve" automaticly detects as soon as a file has changed and restarts the "lite server"

but now it does not work Image may be NSFW.
Clik here to view.
:frowning:

Info: I have 3 projects and it is only happening in one project.

Maybe someone could help me?

Thank you.

Posts: 1

Participants: 1

Read full topic

How to register custom Transitions

@epetre wrote:

I would like to register Transitions for a custom Component that behaves like a Popup (With a custom Controller too).

let newKindOfPopup = this.newKindOfPopupCtrl.create();
newKindOfPopup.present();

It has Transitions similar to the Popup except I see that the Ionic Popup Transitions are registered to all devices using Modes.ts (https://github.com/driftyco/ionic/blob/master/src/config/modes.ts).
Is there a way to extend this file and add my custom transitions too?

My alternative is to wrap my custom component with the alert-wrapper and use the Transitions of the Alert Component like so:

  getTransitionName(direction: string) {
    let key = (direction === 'back' ? 'alertLeave' : 'alertEnter');
    return this._nav && this._nav.config.get(key);
  }

It's not ideal, but it would do the trick since it's so similar, I'm just wondering if there is a better way to register my custom transitions.

Thank you for any help!

Posts: 1

Participants: 1

Read full topic

Embed a view/page as a component

Ionic2 ion-datetime default content

@florianeyzat wrote:

Hello,

I'm using the DateTime component () to fire a pretty date picker on Android and iOS. I'd like to style it and fire it from a click on a button.

I tried a lot of things but nothing seems to work. I noticed that a div element with the class "datetime-text" was generated by the ion-datetime and if I change its content by hand in the developers console in chrome, I can see a text on the button.
But if I do it before the generation, it doesn't work (I even tried the css property "content").

I don't know how to do it, but basically I want my ion-datetime to look like a simple button with a text before it's clicked, and replaced by the datetime entered.

Does anybody have seen or did this before? I didn't find anything online.
thank you

Posts: 1

Participants: 1

Read full topic

Push won't work after cloud migration

@Marrone wrote:

I performed the migration to the new version of Ionic services (cloud).
All works fine exept the push notification, while the device still receive the notification, but I'm not able to handle it as described into migration docs with $on (

$scope.$on('cloud:push:notification', function(data) {
var msg = data.message;
alert(msg.title + ': ' + msg.text);
// never called
});

Dens anyone had this issue?

Posts: 2

Participants: 1

Read full topic

Ionic 2 App loading delay

@almighty99 wrote:

I am building an app with Ionic 2, here is that ionic info

Cordova CLI: 6.1.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0-beta.20
OS:
Node Version: v4.4.4

When I build my app the app shows a white screen for more than 8 seconds. No I am not using any splash screens and I have removed the splash screen plugin as well as the tag from the config.xml file.

No errors or exceptions are shown in the console which means that the app is loading fine. Just there is this huge delay in loading the app.

Any help is appreciated.

Posts: 2

Participants: 2

Read full topic

Why does the preview image not show in Android when using Cordova Camera?

@nataschakater wrote:

I'm building an app in Ionic and I'm having a problem with the preview image in Android. It just doesn't show. I use the plugin Cordova Camera to take and select pictures from your phone. On iPhone I do see the preview image, so there all is working fine.

Anyone has any idea why it's not working on Android?

This code is in controllers.js:

$scope.addImage = function (type) {
    if (type == 'take') {
        $scope.cam = Camera.PictureSourceType.CAMERA;
    } else if (type == 'select') {
        $scope.cam = Camera.PictureSourceType.PHOTOLIBRARY;
    }

    var options = {
        quality: 75,
        destinationType: Camera.DestinationType.DATA_URL,
        sourceType: $scope.cam,
        allowEdit: true,
        correctOrientation: true,
        encodingType: Camera.EncodingType.JPEG,
        targetWidth: 2000,
        targetHeight: 2000,
        popoverOptions: CameraPopoverOptions,
        saveToPhotoAlbum: false
    };

    $cordovaCamera.getPicture(options).then(function (imageData) {
        $scope.imgURI = "data:image/jpeg;base64," + imageData;
        $scope.image = imageData;
        $scope.popover.hide();
    }, function (err) {
        console.log(JSON.stringify(err));
    });
};

And the HTML in the view:

<div class="edit-image" ng-click="popover.show($event)">
    <img ng-if="imgURI && imgURI === undefined" ng-src="{{imgURI }}" />
    <img ng-if="!imgURI && imgURI === undefined" src="https://example.com/noimage.jpg" />
    <img ng-show="imgURI !== undefined" ng-src="{{imgURI}}" class="take_picture" />
</div>

Posts: 1

Participants: 1

Read full topic


Ionic2 Web App to Chrome App?

@ultradryan wrote:

I successfully created an iphone app with ionic2.
I also made a web app version of it online.

now I feeling brave to create chrome app out of it...
naturally i thought i wouldnt be difficult at all, basically just a packaged offline webapp working inside a browser...

I followed the chrome document. Created a manifest.json and point it to the index.html file built from ionic.

but then this happened:

The errors are... overwhelming...

I m new to programming.
I did successfully created the iphone app, learning by doing, yet I couldnt make sense of these errors.

after digging around, I guess there are some permission problems in chrome.
mainly caused by the EvalError I guess, but i hv no idea what to do next to fix it.

Did anyone try building a chrome app before with ionic 2?
If so, any pointers? I understand this is not an ionic 2 issue, but more about chrome.
appreciate if someone here offers some insights to help me get this working.

or is this just impossible to build a chrome app with ionic2?

I built a chrome app with angular 1.x before, I forgot how i fixed it but it was rather straight forward, only to set permission in the manifest.json. however it looks different this time and very few ppl talked about building chrome app with ionic2.

Posts: 3

Participants: 2

Read full topic

Build error when using D3 v4 typings w/ IONIC 2

@Codekhalifah wrote:

I'm attempting to us d3.js version 4. Unfortunately the typings for version 4 aren't complete so for now I have to use typings from https://www.npmjs.com/package/types.d3 . I've installed the needed packages (multiple) there and then used a barrel to roll them into one export statement for d3. When using ionic serve it fails when trying to build. Can anyone help?

Package.json

TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(82,37): Error TS1110: Type expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(107,5): Error TS1131: Property or signature expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(107,14): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(108,14): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(109,14): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(110,16): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(110,35): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(111,13): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(111,22): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(112,13): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(112,22): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(113,17): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(113,36): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(114,14): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(114,23): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(115,14): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(115,23): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(116,16): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(116,41): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(116,45): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(117,16): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(117,41): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(117,45): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(118,12): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(118,21): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(119,15): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(120,16): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(120,27): Error TS1005: ',' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(120,36): Error TS1005: ';' expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(121,1): Error TS1128: Declaration or statement expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(82,37): Error TS1110: Type expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(107,5): Error TS1131: Property or signature expected.
TypeScript error: /Users/arash1/Projects/brite-front-end/node_modules/@types/d3-zoom/index.d.ts(107,14): Error TS1005: ';' expected.

Posts: 1

Participants: 1

Read full topic

IOS image sharing to WhatsApp not working

@nataschakater wrote:

I'm building an app in Ionic where you can post pictures to a feed and then share them to Social Media. I use the Cordova plugin SocialSharing. On Android, sharing a picture to WhatsApp works fine. On iPhone it only shares the text with the image but not the image itself. Sharing to Facebook (for example) is working fine on both devices.

Any idea why it's not working in WhatsApp on an iPhone?

This is the code that's in controllers.js:

$scope.shareImage = function (item) {
    $cordovaSocialSharing
        .share(item.note.text, null, item.image, null)
        .then(function (result) {
        }, function (err) {
           console.log(err);
        });
};

And the HTML in the view:

<div class="share-image" ng-click="shareImage(item)">
    Share this picture
</div>

Posts: 1

Participants: 1

Read full topic

Ionic2 resources splash screen and icon source size

@reedrichards wrote:

In this tutorial http://www.codingandclimbing.co.uk/blog/ionic-2-icon-and-splash-screen-generation-16, I read that the source size for splash.png and icon.png should be the following:

 icon.png: 192x192
 splash.png: 1200x1200

is that always correct? when I run the "ionic resources" command I notice as result that some splash images aren't generated/erased with new images. should I use another size? if yes, which size?

Furthermore I notice following "errors" in the log, that's why I guess I should use another size...

splash android drawable-port-xxxhdpi-screen.png (1280x1920) skipped, source image splash.png (1200x1200) too small
splash android drawable-port-xxhdpi-screen.png (960x1600) skipped, source image splash.png (1200x1200)    too small
splash android drawable-port-xhdpi-screen.png (720x1280) skipped, source image splash.png (1200x1200) too small
splash ios Default-Portrait@~ipadpro.png (2048x2732) skipped, source image splash.png (1200x1200) too small
splash ios Default-Portrait@2x~ipad.png (1536x2048) skipped, source image splash.png (1200x1200) too small
splash ios Default-736h.png (1242x2208) skipped, source image splash.png (1200x1200) too small
splash ios Default-667h.png (750x1334) skipped, source image splash.png (1200x1200) too small

Thx in advance for your tips

Posts: 1

Participants: 1

Read full topic

Vertical ion-range in ionic 2, how to?

@patrioticcow wrote:

I can rotate the slider using css transform: rotate(270deg); but dragging still is on the horizontal plane

Any ideas?

Posts: 1

Participants: 1

Read full topic

How to retrieve the selected options of a multiple ?

@petersenyszyn wrote:

Hi there,

I'm using the following code:

<ion-list class="options">
        <ion-item>
          <ion-label>Available Tags</ion-label>
          <ion-select white_label [(ngModel)]="tags" multiple="true" cancelText="Cancel" okText="Select">
            <ion-option *ngFor="let tag of tagContainer"> {{tag}} </ion-option>
          </ion-select>
        </ion-item>
</ion-list>

I'm trying to bind the selected options to typescript so I can save them to an array and manipulate. What would be the best way to approach this?

Thanks

Posts: 1

Participants: 1

Read full topic

I am trying to use latest updated ionic version with firebase integration , use ModalController, AlertController. I tryed lot but couldn't do one small project. feeling sad

@vinothapplife wrote:

My Json File:

{
"dependencies": {
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/http": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/router": "2.0.0-rc.4",
"angularfire2": "2.0.0-beta.1",
"es6-shim": "^0.35.0",
"firebase": "^3.0.5",
"ionic-angular": "2.0.0-beta.11",
"ionic-native": "1.2.4",
"ionicons": "3.0.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12"
},
"devDependencies": {
"cz-conventional-changelog": "^1.1.6",
"del": "2.2.0",
"gulp": "3.9.1",
"gulp-watch": "4.3.5",
"ionic-gulp-browserify-typescript": "1.1.0",
"ionic-gulp-fonts-copy": "^1.0.0",
"ionic-gulp-html-copy": "^1.0.0",
"ionic-gulp-sass-build": "^1.0.0",
"ionic-gulp-scripts-copy": "^2.0.0",
"run-sequence": "1.1.5"
},
"name": "dohamobapp",
"description": "DohaMobApp: An Ionic project",
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": []
}

{
"dependencies": {
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/http": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/router": "2.0.0-rc.4",
"angularfire2": "2.0.0-beta.1",
"es6-shim": "^0.35.0",
"firebase": "^3.0.5",
"ionic-angular": "2.0.0-beta.11",
"ionic-native": "1.2.4",
"ionicons": "3.0.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12"
},
"devDependencies": {
"cz-conventional-changelog": "^1.1.6",
"del": "2.2.0",
"gulp": "3.9.1",
"gulp-watch": "4.3.5",
"ionic-gulp-browserify-typescript": "1.1.0",
"ionic-gulp-fonts-copy": "^1.0.0",
"ionic-gulp-html-copy": "^1.0.0",
"ionic-gulp-sass-build": "^1.0.0",
"ionic-gulp-scripts-copy": "^2.0.0",
"run-sequence": "1.1.5"
},
"name": "dohamobapp",
"description": "DohaMobApp: An Ionic project",
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",


"cordova-plugin-statusbar",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": []
}

Posts: 1

Participants: 1

Read full topic


Creating a pdf in ionic

Google Analytics trackView Error

@Yimiprod wrote:

When i try to send a tracking with trackView i always catch an error, something like "Track Screen: "

Posts: 2

Participants: 1

Read full topic

Apply a CSS on angular item

@Linezek wrote:

Hi,

I would like to add a CSS on specific item (item.letter) but not on the other (item.text)

<ion-toggle class="item-checkbox-right"
                    ng-click="hashtagPressed(item)" style="text-align: left;"
                    ng-model="item.checked"
                    ng-checked="item.checked">
              {{ item.letter }}
              {{ item.text }}
    </ion-toggle>

thanks

Posts: 3

Participants: 2

Read full topic

Nested ion list not showing properly?

@ntpl_thavarajan wrote:

i have created a Reactive form in that form i want to show the gender option as radio options
the follwoing is my code but it will display anything, some body show me is there any attribute i am missing
here is my code

            <ion-item>
                <ion-label>Date of Birth</ion-label>
                <ion-datetime displayFormat="MM/DD/YYYY" formControlName="dob"></ion-datetime>
            </ion-item>
            <ion-item>
                <ion-list radio-group formControlName="gender">
                    <ion-list-header>Gender</ion-list-header>
                    <ion-item>
                        <ion-label>Male</ion-label>
                        <ion-radio checked value=0></ion-radio>
                    </ion-item>
                    <ion-item>
                        <ion-label>Female</ion-label>
                        <ion-radio value=1></ion-radio>
                    </ion-item>
                </ion-list>
            </ion-item>

and it display nothing in that item

Image may be NSFW.
Clik here to view.

what i am doing wrong

Posts: 1

Participants: 1

Read full topic

No update of ion slide and curious behavior

@MrQ wrote:

Hello,

I want to update a non-visible slide.
Unfortunately this does not work or has a crazy behavior:

If I wipe to the second slide, I would like to update the first slide. That does not happen.
If I click at the first slide on the color (blue), the lettering changed to pink. After I slide through all slides the slide is back to blue.
If I click again and slide through all it remains on pink.

Does anyone have an explanation? Thank you.

Jens

Posts: 1

Participants: 1

Read full topic

Viewing all 70863 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>