Skip to content

Instantly share code, notes, and snippets.

View desaroxx's full-sized avatar
🎯
Focusing

Ken Steiner desaroxx

🎯
Focusing
View GitHub Profile
### Keybase proof
I hereby claim:
* I am desaroxx on github.
* I am desaroxx (https://keybase.io/desaroxx) on keybase.
* I have a public key ASAsztPOzNVJQXwRA-hFvJQHYLqQUV7LRYE4qx2vFdsPqgo
To claim this, I am signing this object:

Endpoint

Relative facade endpoint:

POST /portal/skillmanagement/readInheritedRequirements

Request

request.body:

// file location: /cs-components/cockpit/permission/PermissionService.ts
export class PermissionService {
public getPermission = (objectName: string, operation: string): string => {
// some mock logic here
return returnValue;
};
}
namespace app.services {
export class TemperatureService {
public static $inject: Array<string> = ["$q", "$timeout"];
private currentTemperature: number = 20;
constructor(private $q: ng.IQService, private $timeout: ng.ITimeoutService) {}
public getTemperature(): ng.IPromise<number> {
const deferred: ng.IDeferred<number> = this.$q.defer();
this.$timeout((): void => {
<div class="weather">
<span>Current temperature:</span>
<span>{{weatherCtrl.currentTemperature}}</span>
</div>
namespace pagecontroller {
class HomeController {
public static $inject: Array<string> = ["$timeout"];
public pageTitle: string = "Home";
private name: string = "John Doe";
constructor(private $timeout: ng.ITimeoutService) {}
public sayHello(): void {
namespace app.directives.weather {
class WeatherController {
public static $inject: Array<string> = ["temperatureService"];
public currentTemperature: number;
constructor(private temperatureService: app.services.TemperatureService) {
this.loadTemperature();
}
@desaroxx
desaroxx / angular-controller.ts
Last active December 12, 2015 17:02
Angular Controller written in Typescript
class HomeController {
public static $inject: Array<string> = ["$timeout"];
public pageTitle: string = "Home";
private name: string = "John Doe";
constructor(private $timeout: ng.ITimeoutService) {}
public sayHello(): void {
this.$timeout(() => {
@desaroxx
desaroxx / models.ts
Last active December 21, 2018 18:08
Typescript Models: Interfaces vs Model Classes
/**
* advantages:
* - interface code not compiled
* - faster at runtime (Javascript object only; no prototypes)
*/
interface IServiceCall {
id: string | number;
title: string;
businessPartner: string;
startTime: date;
module Angular {
export class material {
private hello() {
return "hello";
}
}
}