This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { ExampleNg6LibComponent } from './example-ng6-lib.component'; | |
import { FooComponent } from './foo/foo.component'; | |
@NgModule({ | |
imports: [ | |
], | |
declarations: [ | |
ExampleNg6LibComponent, | |
FooComponent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="text-align:center"> | |
<h1> | |
Welcome to {{ title }}! | |
</h1> | |
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="> | |
</div> | |
<h2>Example</h2> | |
<enl-example-ng6-lib></enl-example-ng6-lib> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { AppComponent } from './app.component'; | |
import { ExampleNg6LibModule } from 'example-ng6-lib'; | |
@NgModule({ | |
declarations: [ | |
AppComponent | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"projects": { | |
"example-ng6-lib-app": { | |
}, | |
"example-ng6-lib-app-e2e": { | |
}, | |
"example-ng6-lib": { | |
"root": "projects/example-ng6-lib", | |
"sourceRoot": "projects/example-ng6-lib/src", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"port": 3000, | |
"server": { | |
"baseDir": "." | |
}, | |
"browser": ["chrome"] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "lite", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"start": "lite-server" | |
}, | |
"keywords": [], | |
"author": "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>lite-server</title> | |
</head> | |
<body> | |
<a href="https://github.com/johnpapa/lite-server">lite-server</a> is awesome! | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ThisTester { | |
constructor () { | |
this.testValue = 'ThisTester Class'; | |
} | |
// in arrow functions we can freely use "this". | |
thisArrowTest() { | |
// define a local function like we might use in a promise or callback | |
let myFunction = (x) => console.log('arrow "this" works:', this.testValue) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Tour of Heroes</title> | |
<base href="/" id="baseHref"> | |
<script> | |
(function() { | |
var mypath = window.location.pathname; |