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
@mgechev
mgechev / bootstrap-routes.ts
Created October 24, 2022 14:49
v15 blog post
bootstrapApplication(AppComponent, {
providers: [
provideRouter(appRoutes),
]
});
const { readFileSync } = require('fs');
const { execSync } = require('child_process');
const lastVersion = '14.0.0';
const repos = [
'~/Projects/angular',
'~/Projects/components',
'~/Projects/angular-cli'
];
<link rel="shortcut icon" width=32px>
<canvas style="display: none" id="loader" width="16" height="16"></canvas>
<script>
class Loader {
constructor(link, canvas) {
this.link = link;
this.canvas = canvas;
this.context = canvas.getContext('2d');
this.context.lineWidth = 2;
// constants.js
export const PI = 3.14159265357989;
localStorage.setItem('foo', 'bar');
(()=>{"use strict";console.log(1+2)})();
/******/ (() => { // 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;
@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() {