Skip to content

Instantly share code, notes, and snippets.

View mgechev's full-sized avatar
👷‍♂️
Making web development easier

Minko Gechev mgechev

👷‍♂️
Making web development easier
View GitHub Profile
/******/ (() => { // webpackBootstrap
/******/ "use strict";
// CONCATENATED MODULE: ./utils.js
// utils.js
const add = (a, b) => a + b;
const subtract = (a, b) => a - b;
// CONCATENATED MODULE: ./index.js
// index.js
@mgechev
mgechev / out.js
Last active August 25, 2020 21:49
/******/ (() => { // webpackBootstrap
/******/ "use strict";
// CONCATENATED MODULE: ./operations.js
// utils.js
const add = (a, b) => a + b;
const subtract = (a, b) => a - b;
// CONCATENATED MODULE: ./constants.js
const PI = 3.14159265357989;
@mgechev
mgechev / constants.js
Last active August 25, 2020 21:48
Angular CLI strict mode
// constants.js
export const PI = 3.14159265357989;
@Component({
template: '<h1>{{ article.title }}</h1>'
})
class ArticleComponent {
article: Article | undefined;
}
<div *ngFor="let todo of todos">
<h2>{{ todo.title }}</h2>
<button *ngIf="user.isAdmin">Edit</button>
</div>
import { HttpClient } from '@angular/common/http';
@Component({...})
export class AppComponent {
client: any;
constructor(http: HttpClient) {
this.client = http;
}
handleClick() {
@Component({...})
class AppComponent {
@Input() title = '';
}
@Component({...})
class AppComponent {
@Input() title: string;
}
ng new my-app --strict
data:text/html,<body onload="setInterval(()=>document.body.innerText=new Date().toLocaleTimeString())"></body>