Ion-content has-header being ignored


#1

Anyone else having this issue with the nightly?


#2

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">`

#3

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


#4

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


#5

Ahhmm… did the sideMenuController change as well?


#6

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.


#7

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/?


#8

Nevermind. Found it with some console-logging.

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


#9

Awesome, thanks for pointing this out @Robin


#10

@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?


#11

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


#12

It’s being fixed: @mhartington


#13

Great, good catch @Robin


#14

Aaaand… it’s fixed! Thanks @andy

@Calendee this topic can be closed :smile:


#15

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.


#16

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.


#17

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™.


Ion-content has-header problem in 1.0.0-beta.1
#18

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


#19

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


#21

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