SideMenu app: ui-sref broken on chrome emulator or actual device


#1

ui-sref works fine in 1.0.0-beta.1, however it is currently broken in the nightly.

Works fine in regular Chrome. However, if you try iPhone 5 or Google Nexus 10, or an actual iPhone 5s, it is broken.

Created GitHub issue here: https://github.com/driftyco/ionic/issues/1158


#2

Just tried this myself, same results. Thanks for reporting this!


#3

No problem. It would also be nice if the ionic-bundle’s angular-ui-router dependency was upgraded to 0.2.10. It fixes an issue with ui-sref-opts not being honored.


#4

Theres some testing being done to make sure that 0.2.10 plays nice with ionic :wink:


#5

Cool. I have been using it for a few weeks now without any issues. Thanks for all the hard work you guys are doing to make ionic bad *ss.


#6

This issue has been resolved. Thanks guys!


#7

Glad to hear! Happy coding!


#8

I seem to have this issue in the current release, just posted a new topic on the forum. How does one update the ionic framework with the current nightly to see if the issue is gone, or would that not be recommended and maybe there’s a workaround for this specific issue?


#9

What issue are you having? Can you post a codepen? I changed my codepen temporarily with 1.0.0-beta.1 and didnt see any issues.


#10

The simplest way for a quick test is to comment out the HTML in head for the links to Ionic CSS and JS.

Then, paste this in :

<link href="http://code.ionicframework.com/nightly/css/ionic.min.css" rel="stylesheet">
<script src="http://code.ionicframework.com/nightly/js/ionic.bundle.js"></script>

Of course, that’s temporary only. You then need to decide if you’re going to live on the bleeding edge and use the nightlies for your main development. Lots of risks with that as nightlies change many times per day. Sometimes they are breaking changes.

If you want to go with nightlies, then you can download the current nightly from http://code.ionicframework.com/#nightly


#11

I’m having trouble with ui-sref as well. I think the most recent beta that worked was 2 or 3 (sorry I’ve tried so many). But going back that far breaks other stuff, so I’d really like to get this figured out. Is this a known issue? Is anyone else having this problem? Thanks.


#12

I am currently using 1.0.0-beta8 and I am NOT seeing any issues with ui-sref links. Hope that helps.


#13

Thanks. I think I must have a structural issue because I put in a dumb href link and it’s not working either (NOR is my nav menu). It’s like the view can’t see my taps. Maybe someone can help?

Here is the body of my index.html

<ion-side-menus>
        <ion-nav-bar class="bar bar-header bar-dark"></ion-nav-bar>
        <ion-side-menu-content>
            <ion-nav-view name="content"></ion-nav-view>
        </ion-side-menu-content>
        <ion-side-menu side="left" ui-view="nav"></ion-side-menu>
    </ion-side-menus>

And here is the page, which populates the ‘content’ ion-nav-view, where no links work:

<ion-view class="slide-left-right" title="Check-In"  hide-nav-bar="false"  padding="true">
<ion-nav-bar class="bar bar-header bar-dark">
    <div class="buttons left-buttons">
        <button  menu-toggle="left" class="button button-dark"><i class="icon ion-navicon-round"></i></button>
    </div>
</ion-nav-bar>
<ion-content>
    <ion-refresher pulling-icon="ion-ios7-bolt-outline" refreshing-icon="ion-ios7-bolt" on-refresh="refresh(true)"></ion-refresher>
    <ion-list>            
                <a ui-sref="appmenu({Type:'mobedo.validate',nID:params.nID,sTitle:'Validate'})">link text</a>

    </ion-list>
</ion-content>

Any help would be MOST appreciated. I’m banging my head against the wall right now.


#14

I suggest that you create a codepen to demonstrate the problem you are having. That makes it much easier for others to see your code in action. In my case, I have often figured out the problem myself by going thru the exercise.


#15

Thanks. I think my issue was with my attempt at lazy-loading views and controllers. I don’t have time to figure it out, so I’ve abandoned the lazy-loading idea for now. Works great in the browser, btw, just not on the device. I mean, everything appears to load properly (most of the time) but links don’t work for whatever reason.