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> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>@ViewBag.Title - Meine ASP.NET-Anwendung</title> | |
@Styles.Render("~/Content/css") | |
</head> | |
<body> |
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
/// <reference path="../typings/tsd.d.ts" /> | |
// A '.tsx' file enables JSX support in the TypeScript compiler, | |
// for more information see the following page on the TypeScript wiki: | |
// https://github.com/Microsoft/TypeScript/wiki/JSX | |
var Counter = React.createClass({ | |
add: () => { | |
console.log('add 1!'); | |
}, |
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
using ProxyGenerator.ProxyTypeAttributes; | |
public class ProxyController : Controller | |
{ | |
[CreateAngular2TsProxy(ReturnType = typeof(Person))] | |
public JsonResult AddTsEntryOnly(Person person) | |
{ | |
return Json(person, JsonRequestBehavior.AllowGet); | |
} |
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 {Injectable} from '@angular/core'; | |
import {Http, Response} from '@angular/http'; | |
import {Observable} from 'rxjs/observable'; | |
import 'rxjs/add/operator/map'; | |
@Injectable() | |
export class Proxyservice { | |
constructor(private http: Http) { } |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es5", | |
"module": "commonjs", | |
"moduleResolution": "node", | |
"sourceMap": true, | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"removeComments": false, | |
"noImplicitAny": false, |
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
for (int i = 0; i < 10; i++) | |
{ | |
Console.WriteLine($"Der Aktuelle Index: {i}"); | |
} |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var personNamePropertyName = nameof(Person.Name); | |
Console.WriteLine($"Der Name des Properties ist: {personNamePropertyName}"); | |
} | |
} | |
public class Person |
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
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}"; | |
} |
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
public string Searchnames(List<string> namen) | |
{ | |
var result = string.Empty; | |
if (namen?.Count > 0) | |
{ | |
//do somethig | |
} | |
return result; | |
} |
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
{ | |
"scripts": { | |
"start": "webpack-dev-server --inline --progress --port 8080" | |
}, | |
"dependencies": { | |
"@angular/common": "~2.2.0", | |
"@angular/compiler": "~2.2.0", | |
... | |
} |