Skip to content

Instantly share code, notes, and snippets.

@jhades
jhades / 01.html
Last active February 7, 2023 16:29
The Qwik Framework: An In-Depth Introduction - https://blog.qwikacademy.io/qwik-introduction
<html>
<body>
<ul class="courses-list">
<li>Angular Material Course</li>
<li>Angular Forms In Depth</li>
<li>Angular Router In Depth</li>
<li>Reactive Angular Course</li>
<li>RxJs In Practice Course</li>
@jhades
jhades / 01.html
Created January 20, 2023 14:40
Why Qwik? A Quick Introduction To The Qwik Framework
<!DOCTYPE html><html lang="en">
<head>
<meta charset="utf-8">
<title>Your application</title>
<link rel="stylesheet" href="bundle.css">
</head>
<body>
@jhades
jhades / 01.ts
Last active January 20, 2023 09:32
How to Show Or Hide Template Elements in Qwik - https://blog.qwikacademy.io/qwik-conditional-rendering-show-hide/
export const App = component$<{isLoggedIn:boolean}>( (props) => {
const {isLoggedIn} = props;
return (
<div class="container">
<div className="user-profile">
<img src="https://qwik.builder.io/logos/qwik-logo.svg" />
</div>
<div class="main">
@Component({
selector: 'login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css']
})
export class LoginComponent {
form = this.fb.group({
email: ["", {
@jhades
jhades / 01.ts
Last active February 24, 2022 16:37
Angular Responsive Design: Complete Guide
export declare const Breakpoints: {
XSmall: string;
Small: string;
Medium: string;
Large: string;
XLarge: string;
Handset: string;
Tablet: string;
Web: string;
HandsetPortrait: string;
@jhades
jhades / 01.html
Last active February 10, 2022 10:13
Angular Material Datepicker
<mat-form-field appearance="outline">
<input matInput formControlName="releasedAt">
</mat-form-field>
@jhades
jhades / 01.ts
Last active October 28, 2021 05:12
Angular Dependency Injection: Complete Guide - https://blog.angular-university.io/angular-dependency-injection
export class CoursesService() {
http: HttpClient;
constructor() {
this.http = new HttpClient(... dependencies needed by HTTPClient ...);
}
...
}
<div class="container" *ngIf="userLoggedIn">
.... visible only to authenticated users
<button *ngIf="user.admin">Delete User</button>
</div>
@jhades
jhades / 01.ts
Last active March 30, 2023 09:27
Angular Form Array: Complete Guide - blog.angular-university.io/angular-form-array/
form = this.fb.group({
title: ['', {
validators: [
Validators.required,
Validators.minLength(5),
Validators.maxLength(60)
],
asyncValidators: [courseTitleValidator(this.courses)],
updateOn: 'blur'
<input type="file" class="file-upload" onchange="console.log(event.target.files)">