Skip to content

Instantly share code, notes, and snippets.

View viclotana's full-sized avatar

Lotanna Victor Nwose viclotana

View GitHub Profile
.example-viewport {
height: 200px;
width: 200px;
border: 1px solid black;
}
.example-item {
height: 50px;
}
<div class="example-box" cdkDrag>
Drag me around
</div>
import {Component} from '@angular/core';
/**
* @title Basic Drag&Drop
*/
@Component({
selector: 'cdk-drag-drop-overview-example',
templateUrl: 'cdk-drag-drop-overview-example.html',
styleUrls: ['cdk-drag-drop-overview-example.css'],
})
.example-box {
width: 200px;
height: 200px;
border: solid 1px #ccc;
color: rgba(0, 0, 0, 0.87);
cursor: move;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
@Component({
selector: 'bla-bla',
template: `
<header>
<slot name="bla-header"></slot>
</header>
<slot></slot>`,
encapsulation: ViewEncapsulation.ShadowDom,
styles: []
})
<bla-bla>
<span slot="bla-header">Angular rocks!</span>
<bla-bla>
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"experimentalDecorators": true,
// ...
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"preserveWhitespaces": true,
// ...
npm install -g @angular/cli
ng new newapp