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
/* | |
There are probably more efficient ways of doing this, but this works: | |
1. The li click event sets activeTab to true or false: | |
(click)="activeTab = tab; false;" | |
2. Based on that, we can set the class accordingly: | |
[ngClass]="{'active-tab': tab === activeTab, 'inactive-tab': tab !== activeTab}" | |
*/ | |
<ul id="tab-list" class="tab-list contain" *ngIf="!isEditing"> | |
<li id="tab-button" class="tab-button" (click)="activeTab = tab; false;" *ngFor="let tab of tabs" (mouseover)="tabHover=true" (mouseout)="tabHover=false" [ngClass]="{'active-tab': tab === activeTab, 'inactive-tab': tab !== activeTab}"> |
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"> | |
<title>Handy Dandy HTML5 Modal</title> | |
<meta name="description" content="JavaScript Interview Assignment"> | |
<meta name="author" content="Mr. Shawn Spencer"> | |
<!-- <link rel="stylesheet" href="css/styles.css?v=1.0"> --> | |
<!-- Plastic Buttons Style: https://1stwebdesigner.com/free-code-snippets-css-buttons/ --> |
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
/* | |
Simple Custom Pipe Example | |
Angular 7/8 | |
(must be imported in the module where it is needed, after imports[], in the declarations[] section) | |
convert-chars-to-spaces.pipe.ts | |
*/ | |
@Pipe({ | |
name: 'convertCharsToSpaces' | |
}) |
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
start D:\selecthealth.org\selecthealth.org.website\static |
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
/* | |
Angular @Component Directive | |
If you are using an HTML file as the template in an angular component: | |
*/ | |
@Component({ | |
selector: 'app-provider-search', | |
templateUrl: './provider-search.component.html', | |
styleUrls: ['./provider-search.component.scss'] | |
}) |
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
// Test: https://gist.github.com | |
// console.log(window.location.protocol); | |
// Result: https | |
var wlp = window.location.protocol; |
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
// Just get the hostname of the URL | |
// Example: https://electmyhealthplan.org/find-a-doctor | |
// Result: electmyhealthplan | |
// Test this in the browser console: | |
// var hostname = window.location.hostname.split('.')[0]; console.log(hostname); | |
var hostname = window.location.hostname.split('.')[0]; |
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
[System.Diagnostics.Process]::Start("chrome.exe","--incognito http://localhost:3000") | |
[System.Diagnostics.Process]::Start("chrome.exe","--inconito http://www.google.com") |
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
<!-- | |
Angular/HTML/CSS | |
Sometimes, when you work with a corporate CMS,you cannot predict what people do. | |
I encountered sections on a corporate website with lots of empty DIVs. That | |
created lots of white space and negatively affected the layout. | |
You can hide empty DIVs with (S)CSS: div:empty { display: none !important; } | |
Or you can add an ng-container with *ngIf, shown below. |
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
/* | |
As published elsewhere on the web: | |
IE10 and IE11 | |
================== | |
The first snippet might cause problems if you are coding | |
in Visual Studio Code, because some formatters will insert | |
a line break after the comma: | |
*/ | |
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { |
NewerOlder