I believe I am at 2.0.0, after RC6 there was no more upgrade instructions, it said enjoy!
I have to swipe on this dummy data in order to cause (ionSlideDidChange) to fire the event.
If I enable your AdjustHeight() code I get the following error
Cannot read property ‘children’ of undefined
let height = targetSlide['ele']['children'][0]['clientHeight'];
So are there upgrade steps to go from RC6 to 2.0.0? I can’t see them in snapshot above.
I believe I am doing all what you specified in post 16, I have enabled autoHeight = true, ngAfterViewInit() is getting fired, I can’t see that in the console.
With all respects, I think that’s totally crazy the ionic team might as well support my src/ and other configs and folders side-by-side, if “drop in your existing code” means replace the blank app with my src code. Blowing 30,000 files and creating news one is getting on my nerves :), while we keep creating hello programs I see no productivity.
Anyways, I did what you said Boss.
ionic start --v2 myApp tabs
$ ionic info
Your system information:
ordova CLI: 6.4.0
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v7.2.0
Xcode version: Not installed
Replace home.html with
<ion-header>
<ion-navbar>
<ion-title>Home</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<div id="wrapper">
<ion-slides #mySlider (ionSlideDidChange)="SlideChanged()">
<ion-slide *ngFor="let s of Slides ; let ii=index" class="AMSImage">
<img id="AMSImage" src={{s.PIC}}>
</ion-slide>
</ion-slides>
</div>
</ion-content>
home.ts now looks like after some trimming…I kept just the image alone in ion-slide no slide titles or other divs…
still no resizing. Sometimes on launch only the top 20% of the 1st image is painted, until I swipe.
Let me know what I missed. Are you testing with tabs template?
Thanks
Here is what I see on ionic serve -w chrome or from vscode, and I expect the image to be shrunk height-wise to fit.
Don’t blow a gasket, & don’t get too far off track there. Drop your code, meaning just copy and paste. You asked a question on slides. I’ve been trying to help. If you need help upgrading, read the many topics that will tell you exactly what to do.
Ionic’s quite nice. It only takes a little code to do all you need to do. And upgrading this way will show you all the structural changes. Want to diff 2, 3, 4 or more changelogs? Go for it. It doesn’t give the same as you following the architecture changes, yourself. And there are a TON of changes. …you’d notice them all if you follow the steps listed above. Good luck.
I have shared with you working code, something you can actually copy/paste and test on your side .
I can’t say the same about post 16 and I tried to follow it the best of my abilities, there isn’t much to it.
You have asked to create a new app 2.0.0 instead of upgrading RC6 to 2.0.0, I did.
I only edited home.ts and home.html to match your post 16 Dynamic slide height
However, It’s not working, is that hard to believe?
I have been at this since June 2016, gaskets are cheap I am afraid the cam is going to fly off
I have also found some CSS to auto-resize the image in the available container, however it seems, in my case, to work only for width resizing not for height. Also, unlike on a simple image, the resizing behavior is somehow altered by ionic2/Slider.js, here it is if can help someone you can tweak it to work as expected.
this work for me but when i add element depend id the user select yes option from radio button , new text input appear so, the this text input don’t appear,
should i do a function that do autoheight = true and call it on every change made on radio buttons because i have alot, but it’s not practise, you have any solution