Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,52 @@
}
}
}
},
"demo": {
"root": "demo",
"sourceRoot": "demo/src",
"projectType": "application",
"prefix": "ngr",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "demo/dist",
"index": "demo/src/index.html",
"main": "demo/src/main.ts",
"polyfills": "demo/src/polyfills.ts",
"tsConfig": "demo/tsconfig.json",
"assets": [],
"styles": [],
"scripts": []
},
"configurations": {}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "demo:build"
},
"configurations": {
"production": {
"browserTarget": "demo:build:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"demo/tsconfig.json"
],
"exclude": [
"**/node_modules/**",
"**/api-docs.ts"
]
}
}
}
}
},
"defaultProject": "ng-rocketparts"
Expand Down
3 changes: 3 additions & 0 deletions demo/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div>
<router-outlet></router-outlet>
</div>
11 changes: 11 additions & 0 deletions demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'ngr-app',
templateUrl: './app.component.html'
})
export class AppComponent implements OnInit {
constructor() {}

ngOnInit(): void {}
}
13 changes: 13 additions & 0 deletions demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { routing } from './app.routing';
import { HomeComponent } from './home/home.component';
import { NgRocketPartsModule } from '../../../projects/ng-rocketparts/src/lib/ng-rocketparts.module';

@NgModule({
declarations: [AppComponent, HomeComponent],
imports: [BrowserModule, routing, NgRocketPartsModule],
bootstrap: [AppComponent]
})
export class AppModule {}
13 changes: 13 additions & 0 deletions demo/src/app/app.routing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { ModuleWithProviders } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './home/home.component';

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

export const routing: ModuleWithProviders = RouterModule.forRoot(routes, {
enableTracing: false,
useHash: true
});
3 changes: 3 additions & 0 deletions demo/src/app/home/home.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MaybeAsyncPipe Test
<div>{{test$ | maybeAsync}}</div>
<div>{{'General text' | maybeAsync}}</div>
14 changes: 14 additions & 0 deletions demo/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Component, OnInit } from '@angular/core';
import { Observable, of } from 'rxjs';

@Component({
selector: 'ngrp-home',
templateUrl: './home.component.html'
})
export class HomeComponent implements OnInit {
test$: Observable<string> = of('Observable string');

constructor() {}

ngOnInit(): void {}
}
4 changes: 4 additions & 0 deletions demo/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const environment = {
production: true,
version: require('../../../projects/ng-rocketparts/package.json').version
};
17 changes: 17 additions & 0 deletions demo/src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// The file contents for the current environment will overwrite these during build.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
// The list of which env maps to which file can be found in `.angular-cli.json`.

export const environment = {
production: false,
version: require('../../../projects/ng-rocketparts/package.json').version
};

/*
* In development mode, to ignore zone related error stack frames such as
* `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
* import the following file, but please comment it out in production mode
* because it will have performance impact when throw error
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
11 changes: 11 additions & 0 deletions demo/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Rocket Parts</title>
<base href="/">
</head>
<body>
<ngr-app></ngr-app>
</body>
</html>
12 changes: 12 additions & 0 deletions demo/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

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

// depending on the env mode, enable prod mode or add debugging modules
if (environment.production) {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule);
62 changes: 62 additions & 0 deletions demo/src/polyfills.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
*/

/***************************************************************************************************
* BROWSER POLYFILLS
*/

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';

import 'core-js/fn/object/values';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following for the Reflect API. */
import 'core-js/es6/reflect';

/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';

/**
* Required to support Web Animations `@angular/platform-browser/animations`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.

/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.

/***************************************************************************************************
* APPLICATION IMPORTS
*/
10 changes: 10 additions & 0 deletions demo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"outDir": "temp"
},
"include": [
"./src/**/*.ts"
]
}
3 changes: 3 additions & 0 deletions demo/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../tslint.json"
}
Loading