@nikpoltoratsky
Nikita Poltoratsky
Lead Engineer at Akveo
@nikpoltoratsky
@nikpoltoratsky
tibing/platform-terminal
dev.to/nikpoltoratsky
medium.com/@nik.poltoratsky
@nikpoltoratsky
@nikpoltoratsky
Nikita Poltoratsky
Lead Engineer at Akveo
@nikpoltoratsky
@nikpoltoratsky
tibing/platform-terminal
dev.to/nikpoltoratsky
medium.com/@nik.poltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
{
"nx-enforce-module-boundaries": [
true,
{
"allow": [],
"depConstraints": [
{
"sourceTag": "ui-components",
"onlyDependOnLibsWithTags": ["ui-components"]
},
{
"sourceTag": "admin",
"onlyDependOnLibsWithTags": ["ui-components", "admin"]
},
{
"sourceTag": "client",
"onlyDependOnLibsWithTags": ["ui-components", "client"]
},
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
# Create component
ng g component LoginComponent
# Setup component from library
ng generate @angular/material:table
# Update library
ng update @angular/material
@nikpoltoratsky
{
component: 'card',
children: [
...
],
properties: {
backgroundColor: 'red',
...
}
}
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
{
component: 'card',
children: [
...
],
properties: {
backgroundColor: 'red',
...
}
}
@nikpoltoratsky
@nikpoltoratsky
@nikpoltoratsky
class Renderer {
private differ: IterableDiffer;
render(components: Component[]) {
const changes: IterableChanges<Component> = this.differ.diff(users);
changes.forEachOperation((change: IterableChangeRecord<Component>,
previousIndex: number | null,
currentIndex: number | null) => {
if (previousIndex === null) {
// new component appeared
} else if (currentIndex === null) {
// component existed before but it's removed
} else {
// component was moved from one position to another
}
});
}
}
@nikpoltoratsky
changes.forEachOperation((change: IterableChangeRecord<Component>,
previousIndex: number | null,
currentIndex: number | null) => {
if (previousIndex === null) {
viewContainerRef.remove(previousIndex);
} else if (currentIndex === null) {
viewContainerRef.createComponent(component, currentIndex)
} else {
viewContainerRef.move(component, currentIndex);
}
});
@nikpoltoratsky
@nikpoltoratsky