Ion-content has-header being ignored

Anyone else having this issue with the nightly?

I’m saw you got an answer on github but I think this is something worth sharing,

As they move closer to 1.0 Beta, Ionic is moving to declaring the position attributes as classes. Here’s a comment from the commits

Use the classes 'has-header', 'has-subheader', 'has-footer', and
'has-tabs' to modify the positioning of the ion-content relative
to surrounding elements.

Before: `<ion-content has-header="true">`

After: `<ion-content class="has-header">`
2 Likes

Also, the same applies for ion-nav-bar. Instead of type=“bar-dark” (or whatever), it is now class=“bar-dark”.

Correct. There’s a lot of changes being made so we should be hearing something from the guys maybe this week. I personally liked the older method but I can see the benefits of moving to classes

Ahhmm… did the sideMenuController change as well?

Are you talking about programmatically toggling the menu? I think it has, I can’t seem to open or close the side menu with a button anymore.

This is very annoying. I know using the nightly build has some perks but breaking things every couple of hours without any clear notice doesn’t really encourage me to help debug the nightly versions.

@adam @Calendee Any heads up on how to open/close our side menus? Should we check out the nightly docs at http://ajoslin.github.io/docs/nightly/?

Nevermind. Found it with some console-logging.

$scope.sideMenusController is changed to $scope.$ionicSideMenusController

1 Like

Awesome, thanks for pointing this out @Robin

@mhartington We’re not there yet. If I toggle the side menu once (open then close) it doesn’t toggle again (nothing happens the second time).

Seems like a legit issue. Do you have this as well?

Hmm I think we do. I’m getting some of the same issues.

It’s being fixed: @mhartington

Great, good catch @Robin

Aaaand… it’s fixed! Thanks @andy

@Calendee this topic can be closed :smile:

1 Like

Sorry, I’ve been sick and running late this morning. Glad you go it all worked out. I have personally decided to avoid the nightlies like the plague. When things were more stable, using the nightlies was the only way to get past some of the bigger bugs. However, with the very rapid change of pace, nightlies are just too fickle to use.

I’d strongly recommend you stick to 0.9.27 unless you don’t mind changing your code every 2 hours.

The devs are making some major architecture changes prior to beta. So, as they commit one thing, it is bound to break something else. The “nightly” is really the “something just got committed”. Use at your own peril.

I guess I like to live dangerously… :wink: Like I already suggested to @andy, it would be nice to have a ‘nightly changelog’ for us daredevils to lookup what has been broken :smile: (and how to fix it)

Andy suggested that this would be a nice feature to work on after the 1.0 beta.

As of newest nightly, ion-content now adds the has-{anything} classes dynamically and you don’t have to manage it yourself at all.

That means even if you put an ng-if around a header bar, when it’s added/removed the content will fix itself.

Just one of the many nice things coming very soon for 1.0 beta =)

We are moving very fast and breaking many things - we realize we need to have a very flexible, intuitive, and robust API before 1.0. And many things did need change for that to happen.

It should ship very soon™.

2 Likes

Looks great @andy, can’t wait for everything to be ready

awesome! I just upgraded to beta, and it’s look really good

.has-header.has-header-false { top: inherit; }, and class="has-header-false" are going to solve this issue until it’s fixed