Skip to content

Instantly share code, notes, and snippets.

William ONeal III metavurt

View GitHub Profile
@metavurt
metavurt / angular-ngIf-with-else.html
Created Dec 26, 2017
easy ngIf with ng-template
View angular-ngIf-with-else.html
<p *ngIf="serverCreated; else noServer">Server was created, server name is {{serverName}}</p>
<ng-template #noServer>
<p>no server was created</p>
</ng-template>
View Functional pre ES6
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<button id="push_button">click it</button>
<script id="jsbin-javascript">
View Functional w ES6
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<button id="push_button">clicky clicky</button>
<script id="jsbin-javascript">
View OOP circa 2010
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<button id="push_button">click me</button>
<script id="jsbin-javascript">
You can’t perform that action at this time.