Relative facade endpoint:
POST /portal/skillmanagement/readInheritedRequirements
request.body:
| (function() { | |
| // see code in action: https://jsfiddle.net/desaroxx/jp4pmd2u/ | |
| /* Configuration variables */ | |
| var MAX_COLOR = 200; // Max value for a color component | |
| var MIN_COLOR = 120; // Min value for a color component | |
| var FILL_CHANCE = 0.5; // Chance of a square being filled [0, 1] | |
| var SQUARE = 80; // Size of a grid square in pixels | |
| var GRID = 5; // Number of squares width and height |
| module Angular { | |
| export class material { | |
| private hello() { | |
| return "hello"; | |
| } | |
| } | |
| } |
| /** | |
| * advantages: | |
| * - interface code not compiled | |
| * - faster at runtime (Javascript object only; no prototypes) | |
| */ | |
| interface IServiceCall { | |
| id: string | number; | |
| title: string; | |
| businessPartner: string; | |
| startTime: date; |
| 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(() => { |
| namespace app.directives.weather { | |
| class WeatherController { | |
| public static $inject: Array<string> = ["temperatureService"]; | |
| public currentTemperature: number; | |
| constructor(private temperatureService: app.services.TemperatureService) { | |
| this.loadTemperature(); | |
| } |
| 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 { |
| <div class="weather"> | |
| <span>Current temperature:</span> | |
| <span>{{weatherCtrl.currentTemperature}}</span> | |
| </div> |
| 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 => { |
| // file location: /cs-components/cockpit/permission/PermissionService.ts | |
| export class PermissionService { | |
| public getPermission = (objectName: string, operation: string): string => { | |
| // some mock logic here | |
| return returnValue; | |
| }; | |
| } |