Please help test: Angular 1.3, improved transitions, cached views, etc

Thanks @adam. Am I missing something? When I log $ionicNavBarDelegate I see an _instances hash that has the navBar instance and has a title function in there, but when I do $ionicNavBarDelegate.$getByHandle('navBar') the instance that is returned doesn’t have the title function.

It looks like $ionicViewService.nextViewOptions has gone away, how do we do things like disableAnimation and disableBack?

It looks like disableAnimation might be possible via $ionicConfig.views.transition = ‘none’ but I can’t find anything for disableBack.

$ionicScrollDelegate seems to always return the first instance of scroller instead of the current one as it did in previous versions.

I made a quick demo, if you scroll around in the different home views the scroll position will update as expected in 13. In nightly the value from the first view will always been shown.

13:

Nigthly:

Since the previous pages aren’t completely destroyed, you’ll want to access it by delegate handle like this. https://codepen.io/anon/pen/WbNjzz

@claytongulick I just added nextViewOptions() back into $ionicHistory and created some tests for it. It’s build 726. Thanks for pointing that out.

@adam What about the slide box issue?

@travisdahl There were a few methods that were not linked up correctly on $ionicNavBarDelegate, but I’m not sure why title() wasn’t working for you. In this commit I corrected align and created a few tests for each of the delegate methods.

@siddhartha Right now I’m focusing on the navigation changes, transitions, cached views and nav bar changes. @andy has been working on the slidebox updates and he’ll be getting to these fixes soon, thanks.

@andy @adam Here is the codepen : http://codepen.io/anon/pen/MYWoOY

@adam The problems I described are solved. I’ve more problems whitch I can’t figure out… I’ll post the problems here on the forum tomorrow with a codepen as well

It seems that the ion-content is not setting the correct height when using ion-nav-view.

I have this in my index.html:

<ion-nav-bar>
    <ion-nav-back-button></ion-nav-back-button>
</ion-nav-bar>

<ion-nav-view></ion-nav-view>

And this in the template file that is loaded by the state:

<ion-view view-title="Map View">
	<ion-content scroll="false">
		<div id="map">
		<!-- My content --> 
		</div>
	</ion-content>
</ion-view>

When using the latest beta (#13) the height of the ion-content directive is 100%-[Header height] but when using the current nightly the header height seems not to be subtracted from the ion-content directive.

Sorry, my fault. Seems to work. The error was somewhere else…

There is! :slight_smile: See documentation: http://ionicframework.com/docs/nightly/api/directive/ionView/

I try to run the list example and i see that $ionicListDelegate.closeOptionButtons() dont work.


Thanks

@travisdahl here is a unit test I’m calling title(): https://github.com/driftyco/ionic/blob/04cf629fb42ee9426d05b9a75309a5d506b24f80/test/unit/angular/directive/navBar.unit.js#L155

@Melina There are a few ways to disable caching, but using maxPrefetch(0) will not disable caching, but rather it prevents prefetching templates after the app loads. Would you be able to test out your app using one of these:

// disabling all view caching from your app's config
$ionicConfigProvider.views.maxCache(0);

// cache:false within your view's $stateProvider.state
$stateProvider.state('myState', {
  cache: false,
  url : '/myUrl',
  views: {
    'nav-view': {
      templateUrl : 'my-template.html'
    }
  }
})

// cache-view="false" attribute on ionView
<ion-view cache-view="false" view-title="My Title">
    ...
</ion-view>

Would you be able to try one of those and see if you still have an issue? Thanks

It’s perfect Adam thank you :slight_smile:

I tried the first two solutions and they work great. I will switch between them depending the case.

Thanks,

@weeman would you be able to create a code example of your code? I’d like to see how you have the nav bar structured so I can create tests for you scenario. Thanks.

You sir, are awesome.

@jrowny The update was mistakenly having header bars go on top of nav bars too, which as you pointed out causes issues and not what beta13 did. I committed a fix (basically removed code) which doesn’t put the header-bar on top. Build 733.

I see you had other issues with the nav bar, so with this fix in place would you be able to recreate the other issues in a codepen so I can debug it further? Also, thank you for creating the codepen and describing in detail what the issue is, that helps me debug faster and get the fixes in place faster. Thanks!