Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
fix(app): add the skelton of the app for running examples, this start…
Browse files Browse the repository at this point in the history
…s but has not pages
  • Loading branch information
joshuawilson committed Mar 6, 2017
1 parent ce65aec commit 72431e5
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@
"@angular/compiler": "2.4.9",
"@angular/compiler-cli": "2.4.9",
"@angular/core": "2.4.9",
"@angular/forms": "2.4.9",
"@angular/http": "2.4.9",
"@angular/platform-browser": "2.4.9",
"@angular/platform-browser-dynamic": "2.4.9",
"@angular/router": "3.4.9",
"@krux/condition-jenkins": "1.0.1",
"@types/jasmine": "2.5.43",
Expand Down
14 changes: 14 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

const routes: Routes = [{
path: '',
redirectTo: '',
pathMatch: 'full'
}];

@NgModule({
imports: [ RouterModule.forRoot(routes) ],
exports: [ RouterModule ]
})
export class AppRoutingModule {}
5 changes: 5 additions & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<main class="view-container flex-container in-column-direction">
<div class="view flex-container overflow-auto">
<router-outlet></router-outlet>
</div>
</main>
3 changes: 3 additions & 0 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.app {

}
19 changes: 19 additions & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Component, ViewEncapsulation } from '@angular/core';

/*
* App Component
* Top Level Component
*/
@Component({
encapsulation: ViewEncapsulation.None,
host: {'class': 'app app-component flex-container in-column-direction flex-grow-1'},
selector: 'demo-app',
styleUrls: ['./app.component.scss'],
templateUrl: './app.component.html'
})
export class AppComponent {

constructor() {}

ngOnInit() {}
}
27 changes: 27 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//import './rxjs-extensions';

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';

// App components
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';

// Main areas

@NgModule({
imports: [
AppRoutingModule,
BrowserModule,
FormsModule,
HttpModule
],
declarations: [
AppComponent
],
providers: [],
bootstrap: [ AppComponent ]
})
export class AppModule { }
Binary file added src/app/favicon.ico
Binary file not shown.
11 changes: 11 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<html>
<head>
<base href="/">
<title>NGX Widgets Demo</title>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
</head>
<body>
<demo-app>Loading...</demo-app>
</body>
</html>
11 changes: 11 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// The usual bootstrapping imports
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';

if (process.env.ENV === 'production') {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule);
10 changes: 10 additions & 0 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'core-js/es6';
import 'reflect-metadata';
require('zone.js/dist/zone');
if (process.env.ENV === 'production') {
// Production
} else {
// Development
Error['stackTraceLimit'] = Infinity;
require('zone.js/dist/long-stack-trace-zone');
}
21 changes: 21 additions & 0 deletions src/vendor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Angular 2
import '@angular/common';
//import '@angular/compiler';
//import '@angular/compiler-cli';
import '@angular/core';
import '@angular/forms';
import '@angular/http';
import '@angular/platform-browser';
import '@angular/platform-browser-dynamic';
//import '@angular/platform-server';
import '@angular/router';
//import '@angular/upgrade';

// RxJS
import 'rxjs';

// Other vendors for example jQuery, Lodash or Bootstrap
// You can import js, ts, css, sass, ...

// import 'patternfly-sass-with-css/assets/css/patternfly.css';

0 comments on commit 72431e5

Please sign in to comment.