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
<h2>One way binding</h2> | |
<select [ngModel]="selectedItems" (ngModelChange)="onChange($event)" multiple> | |
<option [ngValue]="i" *ngFor="let i of collection">{{i.name}}</option> | |
</select> | |
<h2>Two way binding</h2> | |
<button>Select all</button><button>Clear selection</button> | |
<select [(ngModel)]="selectedItems" (ngModelChange)="onChange($event)" multiple> | |
<option [ngValue]="i" *ngFor="let i of collection">{{i.name}}</option> | |
</select> |
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 {Directive, Renderer, ElementRef, Input, OnDestroy, Optional, Host} from "@angular/core"; | |
import {SelectMultipleControlValueAccessor} from "@angular/forms"; | |
import {looseIdentical} from "@angular/core/src/facade/lang"; | |
import {Comparator, ComparatorCallback, CUSTOM_SELECT_MULTIPLE_VALUE_ACCESSOR} from "./custom-select.directive"; | |
// [formControlName],select[multiple][wu-select][formControl],select[multiple][wu-select][ngModel] | |
@Directive({ | |
selector: 'select[multiple][wu-select]', | |
host: {'(change)': 'onChange($event.target)', '(blur)': 'onTouched()'}, |
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 {Routes, Route} from "@angular/router"; | |
import {Injectable} from "@angular/core"; | |
@Injectable() | |
export class RouteLinkProviderService { | |
protected routes: Routes; | |
protected routesByComponents = new Map<any, any>(); | |
constructor(routes: Routes) { |
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 {ActivatedRouteSnapshot, UrlSegment, Params, Data, Route} from "@angular/router"; | |
import {Type, Injectable} from "@angular/core"; | |
import {Subject, ReplaySubject} from "rxjs"; | |
@Injectable() | |
export class RouteFlattenerService { | |
public getFlattenedRouteData(route: ActivatedRouteSnapshot): FlattenedRouteData { | |
let downLevel = this.getActivatedRouteSnapshotWithChildren(route); | |
downLevel.splice(0, 1); | |
let upLevel = this.getActivatedRouteSnapshotWithParents(route); |
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
<div> | |
<a [ngClass]="{'active': isActive}" (click)="toggle()">{{tabTitle}}</a> | |
<ng-content *ngIf="isActive"></ng-content> | |
</div> |
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 { Component, OnInit } from '@angular/core'; | |
import { ActivatedRoute } from '@angular/router'; | |
import { Crisis } from './crisis.service'; | |
@Component({ | |
template: ` | |
<div *ngIf="crisis"> | |
<h3>"{{ editName }}"</h3> | |
<div> | |
<label>Id: </label>{{ crisis.id }}</div> |
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 { Component, OnInit } from '@angular/core'; | |
import { Crisis } from './crisis.service'; | |
@Component({ | |
template: `.......` | |
}) | |
export class CrisisDetailComponent implements OnInit, OnChanges { | |
editName: string; | |
@RouteParam() |
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
#!/usr/bin/env groovy | |
updateGitlabCommitStatus state: 'pending' | |
pipeline { | |
agent any | |
options { | |
// Here add name of your saved gitlab configuration with API key | |
gitLabConnection('Configured gitlab') | |
} | |
stages { | |
stage('Build') { |
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
package cz.profinit.dagensia.tradeportal.backofficegui.rest.dto; | |
/** | |
* @author David Klingenberg | |
*/ | |
public class UserDto { | |
public Long id; | |
public String nickname; | |
public String personName; | |
public String personSurname; |
OlderNewer