Skip to content

Instantly share code, notes, and snippets.

View squadwuschel's full-sized avatar
💭
Working

SquadWuschel squadwuschel

💭
Working
  • Relaxdays
  • Germany
View GitHub Profile
@squadwuschel
squadwuschel / index.html
Last active December 8, 2016 06:58
Angular 2 mit webpack 2 unkompilierte index.html
<!DOCTYPE html>
<html lang="de">
<head>
<title>Angular2 Mit WebPack 2</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<!-- base url -->
@squadwuschel
squadwuschel / boot.ts
Created December 7, 2016 09:11
Angular 2 Webpack 2 boot.ts
/// <reference path="../typings/index.d.ts" />
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
const platform = platformBrowserDynamic();
platform.bootstrapModule(AppModule);
@squadwuschel
squadwuschel / polyfills.ts
Created December 7, 2016 09:10
Angular 2 webpack polyfills
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
@squadwuschel
squadwuschel / vendors.ts
Created December 7, 2016 08:29
Angular 2 webpack vendors.ts
// Angular
import '@angular/platform-browser';
import '@angular/platform-browser-dynamic';
import '@angular/core';
import '@angular/common';
import '@angular/forms';
import '@angular/http';
import '@angular/router';
@squadwuschel
squadwuschel / package.json
Created December 7, 2016 08:07
npm Scripts
{
"scripts": {
"start": "webpack-dev-server --inline --progress --port 8080"
},
"dependencies": {
"@angular/common": "~2.2.0",
"@angular/compiler": "~2.2.0",
...
}
@squadwuschel
squadwuschel / elvisopertator.cs
Created November 27, 2016 12:30
ElvisOperator beispiel
public string Searchnames(List<string> namen)
{
var result = string.Empty;
if (namen?.Count > 0)
{
//do somethig
}
return result;
}
@squadwuschel
squadwuschel / person.cs
Created November 27, 2016 12:21
Property Initialisierung C# 6
public class Person
{
public string Name { get; set; } = string.Empty;
public string Vorname { get; set; } = string.Empty;
public int Alter { get; set; } = 21;
public List<string> Spitznamen { get; set; } = new List<string>();
public string Anzeigename => $"{Vorname}, {Name}";
}
@squadwuschel
squadwuschel / nameof.cs
Created November 27, 2016 12:15
Nameof Beispiel
class Program
{
static void Main(string[] args)
{
var personNamePropertyName = nameof(Person.Name);
Console.WriteLine($"Der Name des Properties ist: {personNamePropertyName}");
}
}
public class Person
@squadwuschel
squadwuschel / stringInterpolation.cs
Last active May 29, 2017 09:29
String Interpolation C# 6
for (int i = 0; i < 10; i++)
{
Console.WriteLine($"Der Aktuelle Index: {i}");
}
@squadwuschel
squadwuschel / tsconfig.json
Last active February 28, 2017 08:21
Angular 2 "Hello World" tsconfig.json Einstellungen
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,