<!DOCTYPE html>
<html>

  <head>
    <base href="." />
    <title>Flex-Layout Template</title>
    <link rel="stylesheet" href="assets/style.css" />
    
    <!-- Polyfills -->
    <script src="https://unpkg.com/core-js/client/shim.min.js"></script>
    <script src="https://unpkg.com/zone.js@0.7.4?main=browser"></script>
    <script src="https://unpkg.com/systemjs@0.19.39/dist/system.src.js"></script>

    <script src="lib/config.js"></script>
    <script>
    System.import('app')
      .catch(console.error.bind(console));
  </script>
  </head>

  <body>
    <test-app>
    loading...
  </test-app>
  </body>

</html>
System.config({
  //use typescript for compilation
  transpiler: 'typescript',
  //typescript compiler options
  typescriptOptions: {
      // Copy of compiler options in standard tsconfig.json
      "target": "es5",
      "module": "es2015",
      "moduleResolution": "node",
      "sourceMap": true,
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "noImplicitAny": true,
      "suppressImplicitAnyIndexErrors": true
  },
  meta: {
      'typescript': {
        "exports": "ts"
      }
    },  
  paths: {
    'npm:': 'https://unpkg.com/'
  },
  //map tells the System loader where to look for things
  map: {
    
    'app': './src',

    '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
    '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
    '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
    '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
    '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
    '@angular/flex-layout' : 'https://rawgit.com/angular/flex-layout-builds/master/bundles/flex-layout.umd.js',
    
    // other libraries
    'rxjs':                      'npm:rxjs',
    'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
    'typescript':                'npm:typescript@2.0.10/lib/typescript.js',    
  },
  //packages defines our app package
  packages: {
    app: {
      main: './boot.ts',
      defaultExtension: 'ts'
    },
    rxjs: {
      defaultExtension: 'js'
    }
  }
});
//main entry point
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {TestAppModule} from './app/test-app-module';

platformBrowserDynamic().bootstrapModule(TestAppModule);
//our root app component
import {Component} from '@angular/core'

@Component({
  selector: 'test-app',
  template: `
    
    <div class="containerX">
    <h4>xfFlex="33", fxLayoutGap="3px"</h4>
      <div fxLayout="row" fxLayoutWrap fxLayoutGap="3px">
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
      </div>
    </div>

    <div class="containerX">
    <h4>xfFlex="33", fxLayoutGap="4px"</h4>
      <div fxLayout="row" fxLayoutWrap fxLayoutGap="4px">
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
        <div class="box" fxFlex="33">fxFlex</div>
      </div>
    </div>
    
    <div class="containerX">
    <h4>xfFlex="32", fxLayoutGap="4px"</h4>
      <div fxLayout="row" fxLayoutWrap fxLayoutGap="4px">
        <div class="box" fxFlex="32">fxFlex</div>
        <div class="box" fxFlex="32">fxFlex</div>
        <div class="box" fxFlex="32">fxFlex</div>
        <div class="box" fxFlex="32">fxFlex</div>
        <div class="box" fxFlex="32">fxFlex</div>
        <div class="box" fxFlex="32">fxFlex</div>
        <div class="box" fxFlex="32">fxFlex</div>
        <div class="box" fxFlex="32">fxFlex</div>
        <div class="box" fxFlex="32">fxFlex</div>
      </div>
    </div>
    
    <div class="version">Using @angular/flex-layout (current HEAD on Github Master)</div>
  `,
})
export class TestApp {
}
import {Component, NgModule} from '@angular/core'
import {BrowserModule} from '@angular/platform-browser'
import * as Rx from 'rxjs/Rx';

import {FlexLayoutModule} from "@angular/flex-layout";

import { TestApp} from "./test-app";

@NgModule({
  imports: [ 
    BrowserModule,
     FlexLayoutModule
  ],
  declarations: [ TestApp ],
  bootstrap: [ TestApp ]
})
export class TestAppModule {
  
}
.containerX {
  margin-top: 45px;
  border: solid 1px #b6b6b6;
  box-sizing: content-box !important;
  padding:8px;
}

.colorNested, .colored, .coloredContainerX {
  height:200px;
}

md-card {
  background-color: white;
}

div.coloredContainerX > div, div.colorNested > div > div {
  padding: 8px;
  box-shadow: 0px 2px 5px 0 rgba(52, 47, 51, 0.63);
  opacity: 0.9;
  color: #fff;
  text-align: center;
}

div.coloredContainerX > div:nth-child(1), div.colorNested > div > div:nth-child(1) {
  background-color: #009688;
}

div.coloredContainerX > div:nth-child(2), div.colorNested > div > div:nth-child(2) {
  background-color: #3949ab;
}

div.coloredContainerX > div:nth-child(3), div.coloredChildren > div:nth-child(3), div.colorNested > div > div:nth-child(3) {
  background-color: #9c27b0;
}

div.coloredContainerX > div:nth-child(4), div.coloredChildren > div:nth-child(4), div.colorNested > div > div:nth-child(4) {
  background-color: #b08752;
}

div.coloredContainerX > div:nth-child(5), div.coloredChildren > div:nth-child(5), div.colorNested > div > div:nth-child(5) {
  background-color: #5ca6b0;
}

div.colored > div {
  padding: 8px;
  box-shadow: 0px 2px 5px 0 rgba(52, 47, 51, 0.63);
  opacity: 0.9;
  color: #fff;
  text-align: center;
}

div.colored > div:nth-child(1), .one {
  background-color: #009688;
}

div.colored > div:nth-child(2), .two {
  background-color: #3949ab;
}

div.colored > div:nth-child(3), .three {
  background-color: #9c27b0;
}


div.colored > div:nth-child(4), .four {
  background-color: #8bc34a;
}

div.colored > div:nth-child(5), .five {
  background-color: #03A9F4;
}

div.colored > div:nth-child(6), .six {
  background-color: #c9954e;
}

div.colored > div:nth-child(7), .seven {
  background-color: #FF5722;
}

.hint {
  margin:5px;
  font-size:0.9em;
  color: #a3a3a3;
  margin-bottom:0;
}

.title {
  margin:5px;
  font-size:0.9em;
  color: #5c5c5c;
}

.box {
  border: solid 1px #dedede;
}


button.md-primary {
  margin-left:25px;
}

.demo-content {
  background-color: ghostwhite;
}

md-toolbar-row  button {
  min-width: 150px;
}

div.colored.box.nopad > div {
  padding: 0;
}

.intro {
  margin-top: -52px;
  margin-left: 15px;
  color: #5c5c5c;
}

.version {
  font-size:0.8em;
  color: #aeaeae;
  margin-top:20px;
}



.block {
  min-width: 75px;
  min-height: 50px;
}