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

New features sound great!

Have updated my beta11 project to the nightly build (1.0.0-beta.13-nightly-699) using:
bower install driftyco/ionic-bower#master --save-dev
bower update

I’m now getting the following error when I attempt to view the index.html page

@adam @vir474, looks like this issue resolved itself with #699

@adam, $ionicNavBarDelegate seems to be broken, whenever using the #back method and #getPreviousTitle method I get this error.

I am trying to update my project from beta11 to the nightly build but I can’t get it working.

I changed ionicViewService for ionicHistory and this error disappears but now I’m facing some other weird errors like "Invalid regular expression: nothing to repeat" or when I want to enter in a state I’m getting the error “Unexpected number '.0”, is there someone with the same issues?

Cached Views ! I’m fighting this issue with angular-ui-router-extra before see this post. It’s saved my days! I will keep testing nightly version on my project :smiley:

Is there a timeframe as to when this update is coming out? I need angular 1.3 because it allows using getters and setters in models.

Loving ionic so far, keep it up!

I saw that most changes can be used on side menu example. Can you give us a codepen example with sidemenu based 699 build.
Thanks

EDIT: merging the various posts since all in a small timeframe :stuck_out_tongue:

BUG #1
When using the swipe-to-left function on ion-list to show a “Delete” button, there is an error (probably an unchecked null pointer):

TypeError: lastDrag.content is null
in script: /bower_components/ionic/release/js/ionic.bundle.js (Line 6454)

QUESTION #1 - SOLVED
How can we remove the back button text?
EDIT: the question seems to be primarily for iOS platform, since on Android (at least 4.2) there’s no text near the back button.

If overwritten with other text it changes, but what if we don’t want any text but just an icon (custom or not)?
SOLUTION: Just for reference waiting for the release of the documentation, it’s all configured in the $ionicConfigProvider.
This is the code I’ve used:

$ionicConfigProvider.backButton.text('');
$ionicConfigProvider.backButton.previousTitleText(false);

Too bad it can’t be chained, but oh well, we can’t get everything :slight_smile:

QUESTION #2
Don’t know if this is Ionic’s scope or angular-route, but even in doubt:
I’ve got a welcome view (/welcome) which leads to a couple of subviews: /app/login and /app/register.

In beta13, navigating /welcome -> /app/login was showing, in the second view, the back button.
Now no back is shown.
Note that the back is correctly showing in the “normal” application flow (after login).
Do I have some misconfiguration?

A similar problem is when using a similar flow: /app/view1 -> /app/view2/subview.
Here the back button is shown, but tapping on it doesn’t do anything. No back, no errors in console.

BUG #2
Setting ‘ios’ as animation for an Android device leads to ugly animations and broken navBars.

Just tested it and got 2 problems:

  1. Same problem as @hendrixer with $ionicNavBarDelegate.back();
    looks like with $ionicHistory.backView(); it does work
  2. Collection-Repeat does sometimes not rearrange the items, they stay on Pos 1 like this:

    most of the time it happens when open a modal on a different view.
  3. Collection-Repeat does not change when the source(service websql/SqlPlugin) is modified outside of this view.
    is there a trick to refresh it?
  4. Because of the Cached view the controller is not run is this right?
    Because $rootScope variable does not have the right value after page switch.
    Page A: $rootScope.hideTabs = false; >
    Page B: $rootScope.hideTabs = true; >
    goBack to Page A >
    variable is still $rootScope.hideTabs = true;

if you want i can try to create codepens.

I gave it a try and face a few issues but I probably just have to adjust my approach and I suppose there is an easy workaround to this.

I have some actions that I need to execute each time the user enters a specific view, previously since the corresponding scope/controller was destroyed and re-created each time, it was pretty straight forward and I just had to put those actions directly in the corresponding controller.

Now since the view and controller are cached, this only occurs once.

I have tried to use ng-init into the views but this is also only being called once at the first initialization.

<ion-view view-title="Sources" hide-back-button="true" hide-nav-bar="false" ng-init="initSources()">

Do I have another way than monitoring:

$rootScope.$on("$stateChangeStart", ...)

To be informed when a view is again being displayed so that I can refresh the corresponding data ?

I also notice that in one view my collection-repeat content is properly updated when new data is received however not some of the dynamic variables such as the one I have in my title are never updated after the first assignment:

<ion-view view-title="Library [{{libraryItems.length}}]" hide-back-button="!showBack">

Finally, I also have strange behavious with the back button. By default this new version considers all my views are child view (so it displays the back button and prevents to swipe to open the menu).

I see the same strange back button behaviours using the default generated app using

$ ionic start myApp sidemenu

Thanks!

I tested my app with the latest nightly on an iPhone 4s (ios8) and a motorola E (android 4.4).
The animations on android are a lot smoother!

Bugs Android and iOS

  • Changing views from the sidemenu on both Android and iOs has a slower respond time than in Beta13 (I haven’t figured out why yet)
  • Hide-nav-bar doesn’t work anymore
  • Side menu pullout by gesture only works on the initial view. (when navigating to a new view I am unable to swipe out the sidemenu by gesture)
  • Slidebox bullets are not visible in a model when the model is shown a second time

Bugs on Android:

  • When using <div class='buttons'></div> {{title}} on a model the title and buttons are on top of each other.

I am using this approach for reloading some actions when I enter a specific view:

$scope.$on('$stateChangeSuccess', function(event, toState) {
            if (toState.name == "app.home") { //this makes sure that it's not loaded on leave
                $scope.initView();
            }
})

I still dont see anything man . :frowning: @Hendrixer @adam with the 699 build

I updated the Breaking Changes list to include removing navBarController#changeTitle, navBarController#getTitle, navBarController#back and navBarController#getPreviousTitle.

The back() method has been removed in favor of using $ionicHistory.goBack(). Additionally, $ionicGoBack() is added to the rootscope. The getPreviousTitle() method has been removed in favor or $ionicHistory.backTitle().

@xMarston Can you provide the stack trace? IonicViewService and ionicHistory were not a one for one change, so you may be using methods that no longer exist.

I’m facing the same problem. Did you already find a solution?

@Vargash

Bug #1 Fixed: commit

Question #1: Yes the $ionicConfigProvider gives you config variables. I need to document them before releasing beta14.

Question #2: Can you provide a codepen replicating the issue? I can’t help without seeing how your app is structured.

Bug #2: You need to set the $ionicConfigProvider.navBar.transition('ios') too.

@auro Yes if you could create a codepen replicating the issue this would help us see what the issue is.

I found a codepen where the navigation issue (Displaying back button instead of hamburger button after choosing an element from side menu) is visible:

The problem is still present in 702 and is also directly visible by creating a new sidemenu app.

http://codepen.io/ionic/pen/tcIGK

After chosing an item it should display the hamburger button and allow to use slide gesture to display the menu again since we didn’t navigate from another view but selected one from the menu.

This is the behaviour with enable-menu-with-back-views=“false”.

If this one if changed to true, the result is to have both back button + hamburger being displayed.

Thanks

@adam
Question #2
I can’t seem to create ad adeguate codepen to replicate the issue, that’s odd… on my app, it’s like it’s not setting the history when going from /welcome to /login, 'cause even un-hiding the back button via Firebug and clicking it it does’nt return back.

Bug #2
Tried that too, but the effect is the same :confused:
Has anyone else tried this one?