Ion-content

I have markup like this.

<!DOCTYPE html>
<html>

<head>
    <title></title>
    <meta charset="utf-8" />
    <link href="css/ionic.css" rel="stylesheet" />
</head>

<body>
    <div class="bar bar-header bar-light">
        <h1 class="title">Header</h1>
    </div>

    <ion-content>
        <h1>Header</h1>
    </ion-content>

    <div class="bar bar-footer">
        <div class="title">Title</div>
    </div>

</body>
Observed: ioc-content is hidden under bar-header. What i'm doing wrong?

add the class has-header to <ion-content>

doesn’t work with has-header class

Try this

<ion-header-bar class="bar-light">
        <h1 class="title">Header</h1>
</ion-header-bar>

<ion-content>
    <h1>Content</h1>
</ion-contetn>


<ion-footer-bar class="bar-light">
        <h1 class="title">Header</h1>
</ion-footer-bar>

This was, ion-content will auto-adjust if there is a header or footer in the view.

@mhartington

this is the result…
I’m following official docs… and it doesn’t work…

Is ionic loading correctly?

Take a look at this demo.

@mhartington all loaded great… but got this error in bundle…

What system is this? Appgyver?

@mhartington appbuilder

Can you paste the content of your index.html ?

@mhartington sure. Here it is: http://pastebin.com/Xui5D9tG

It looks like your not initializing angular, add this script

angular.module('ionicApp', ['ionic'])

Then the html or body tag, add this

ng-app="ionicApp"

@mhartington yep! Thats works!
I thought that is css responsibility…

Nope, the real magic is in the javascript, which uses angular.

@mhartington Thanks! Sorry for interruption…

No worries :smile:

It’s what I’m here for