This file contains 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
adam-bender.commit-message-editor | |
adpyke.codesnap | |
ahmadalli.vscode-nginx-conf | |
ahmadawais.shades-of-purple | |
alexkrechik.cucumberautocomplete | |
andrew-codes.cypress-snippets | |
angular.ng-template | |
anysphere.pyright | |
astro-build.astro-vscode | |
atian25.copy-syntax |
This file contains 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" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Spirograph</title> | |
<link rel="preconnect" href="https://fonts.googleapis.com" /> | |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | |
<link | |
href="https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap" |
This file contains 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
<!-- Add this before your HTML's closing body tag --> | |
<script> | |
Reveal.initialize({ | |
controls: true, | |
progress: true, | |
history: true, | |
center: true, | |
plugins: [ | |
RevealMarkdown, |
This file contains 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
it('should return expected user data (HttpClient called once)', () => { | |
const mockUsers: User[] = [ | |
{ | |
id: 1, | |
name: 'User A', | |
email: '[email protected]', | |
username: 'userA', | |
address: { | |
street: 'sample street 1', | |
suite: '123 ABC', |
This file contains 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
// replace the tests below | |
it('should call the CounterService.getFromStorage method on component init', () => { | |
jest.spyOn(CounterServiceMock, 'getFromStorage'); | |
component.ngOnInit(); | |
expect(component.counterService.getFromStorage).toHaveBeenCalled(); | |
}); | |
it('should retrieve the last saved value from CounterService on component init', () => { | |
jest.spyOn(CounterServiceMock, 'getFromStorage').mockReturnValue(12); | |
component.counterService.saveToStorage(12); |
This file contains 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
.cdk-overlay-container { | |
display: block; | |
&.z-index-top { | |
z-index: 2050; | |
} | |
} | |
.duplicate-modal-overlay { | |
z-index: 999; | |
} |
This file contains 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
<ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]="popoverMenuOrigin!" | |
[cdkConnectedOverlayOpen]="menuShown" [cdkConnectedOverlayHasBackdrop]="true" | |
(backdropClick)="closeMenu()" | |
[cdkConnectedOverlayPositions]="menuPositions" | |
cdkConnectedOverlayPanelClass="menu-popover" | |
> | |
<div class="menu-popover__list"> | |
<div class="menu-popover__list__item"> | |
Duplicate | |
</div> |
This file contains 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 { AfterViewInit, ChangeDetectorRef, Directive, Input, OnChanges, Renderer2, SimpleChanges, inject } from '@angular/core'; | |
@Directive({ | |
selector: '[appPopoverPositionalClass]', | |
standalone: true, | |
}) | |
export class PopoverPositionalClassDirective implements AfterViewInit, OnChanges { | |
@Input() originY: string | undefined = 'top'; | |
@Input() targetSelector!: string; | |
@Input() inverseClass = ''; |
This file contains 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 {describe, expect, test} from '@jest/globals'; | |
import * as API from './api'; | |
import fetch from 'jest-mock-fetch'; | |
describe('api module', () => { | |
test('addProp should add bootcamp', async () => { | |
/** | |
* spying on the fetchUser method to check if it is called | |
* by addProp | |
* we're also mocking a return value from the fetchUser |
This file contains 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
[ | |
{ | |
"question":"Which is the purpose of JavaScript?", | |
"answers":{ | |
"1":"To style HTML Pages", | |
"2":"To add interactivity to HTML pages", | |
"3":"To perform server side scripting operations" | |
}, | |
"correctAnswerId":"2", | |
"id":"1" |
NewerOlder