Please help test: Angular 1.3, improved transitions, cached views (repost)

Hi, I have upgraded to nightly 879.

view-title still has issues with setting titles. Titles from previous pages using $state.go appear on the new page. As well as my state provider has broken. States stockcheck/productresult/accessories/pricing. I cant navigate to them and back buttons work sporadically.

angular.module('WebROE', [
	'ionic',
	'WebROE.services',
	'WebROE.controllers'
]).config(function($stateProvider, $urlRouterProvider) {
		$stateProvider
		.state('signin', {
			url: "/sign-in",
			templateUrl: "sign-in.html",
			controller: 'SignInCtrl'
		})
		.state('tabs.productresult', {
			url: "/product-result",
			templateUrl: "product-result.html",
			controller: 'ProdResultCtrl',
			 views: {
				'product-search': {
				templateUrl: "product-result.html",
				controller: ProdResultCtrl
			}
		}
		})
		.state('tabs.stockcheck', {
			url: "/stock-check",
			templateUrl: "stock-check.html",
			controller: 'StockCtrl',
			views: {
				'product-search': {
				templateUrl: "stock-check.html"
				}
			}
		})
		
		.state('tabs.pricecheck', {
			url: "/price-check",
			templateUrl: "price-check.html",
			controller: 'PriceCtrl',
			views: {
				'product-search': {
				templateUrl: "price-check.html"
				}
			}
		})
		
		.state('tabs', {
			url: "/tab",
			abstract: true,
			templateUrl: "tabs.html"
		})
		
		.state('tabs.home', {
			url: "/home",
			views: {
				'home-tab': {
					templateUrl: "home.html",
					controller: 'HomeTabCtrl'
				}
			}
		})
		
		.state('tabs.accountsettings', {
		url: "/accountsettings",
		views: {
			'account-settings': {
			templateUrl: "account-settings.html",
			controller: AccountCtrl
			}
		}
		})
		
		.state('tabs.productsearch', {
			url: "/productsearch",
			views: {
				'product-search': {
				templateUrl: "product-search.html",
				controller: 'ProductSearchCtrl'
				}
			}
		})
		
		
		.state('tabs.accessories', {
		url: "/accessories-check.html",
		views: {
			'product-search': {
			templateUrl: "accessories-check.html",
			controller: AccessoriesInfoSearch
			}
		}
		})
	$urlRouterProvider.otherwise("/sign-in");
})

Any idea on how to fix?

Hey @ioudas

So I’m not seeing the issue with the view titles.

Any chance you could try to reproduce it in a codepen?

Id have to rewrite a lot of my app to do it. I can send you some screen shots/videos tho and some code. Easily. Will that work?

Any idea why i cant navigate using that state.go?

Is there documentation on how state provider should work now?

@adam I sent you a pm. But I noticed $state.go is broken on cached views not those with caching turned off.
(Note: $ionicConfigProvider.views.maxCache(0) didn’t work, had to specifically set cache:false for each individual state.)
And for some reason this is only broken on localhost/phonegap…

As of build 885, we’ve refactored how Android transitions work. Basically instead of transitioning in from bottom to center (and in the case of tabs the second view in the tab would cover up the tab icons), it now transitions left/right. The biggest change is that tab icons will now always be shown no matter what view in the tab’s stack they navigated to.

2 Likes

Thank you all, thank you @mhartington, thank you @adam, thank you @Calendee
I would like to remind you this note from old post about slidebox

With great thanks for your tremendous efforts

In the last build (885), sass code for tabs changed.

It seems to break active tab color for tabs-striped.

Here a codepen : http://codepen.io/melina34/pen/PwNPQz

Before this build active tabs had the color of the bar (in the example assertive)

A question about cached views: In earlier nightlies (with cache enabled) the $scope.$on( “$ionicView.enter”, function() {} ) would be called when entering a cached view. It isn’t anymore. It was kind of useful…

@JesperWe Would you be able to provide an example of it not working? Thanks

@ioudas Could you provide an example of the problems you’re having? I can’t debug just from your stateProvide configs. Thanks

With the last build and the update for Android, I got a new weird issue on Android 4.4, a bottom border appears on header bar :

Here a screenshot :

It disapears after I navigate a few times through my different views, very weird

Here comes another turn of my slides nagging.
Look at updated Plunkr at http://plnkr.co/edit/ulFiD5hPLD5NX5JpyIrB?p=preview

Two problems:

  1. $slide.select() fails with “Cannot read property ‘length’ of undefined” at: circle (http://code.ionicframework.com/nightly/js/ionic.bundle.js:7040:21)

  2. Note that the three slides have their content visible. This is because of my horrible workaround at single.html line 5. Change that line from <ion-content style="position: relative;">
    to the correct <ion-content> and the slide content becomes invisible.

No, I can’t :smiley:
That was apparently caused by some other screwup on my part, now when I remove my cache: false specifications it works in all the recent nightlies… Sorry.

1 Like

Melina, what device are you using?

You can fix that with some css at the moment, but I will check to see what the logic is behind that.

I use an LG G3

In build 882, I don’t have this issue for example. I don’t have tried all the builds, but it’s a recent add I think.

Ok, perfect.

Thank you !

Issue with latest nightly sass wont compile

Running "sass:vendor" (sass) task
Error: Base-level rules cannot contain the parent-selector-referencing character '&'.
        on line 127 of www/lib/ionic/scss/_tabs.scss, in `tabs-background'
        from line 247 of www/lib/ionic/scss/_tabs.scss
        from line 20 of www/lib/ionic/scss/ionic.scss
        from line 6 of ./www/scss/vendor.scss
  Use --trace for backtrace.

the commit that broke this i think was

cyprusglobe, try updating your scss install. If that didn’t compile with the latest versions, we wouldn’t pass our CircleCI tests noted on our main github page. https://github.com/driftyco/ionic

EDIT
Actually, that error doesn’t make sense. Are you sure you don’t have an outstanding merge conflict on the file?

Perry - It’d be nice if the nightlies bundled the SCSS directory as well. That way all of Ionic could be replaced in a single download.

1 Like