Skip to content

Instantly share code, notes, and snippets.

View ArtemRomanovsky's full-sized avatar

ArtemRomanovsky

View GitHub Profile
export const routes:RouterConfig = [
...LoginRoutes,
...RegisterRoutes,
...PagesRoutes,
{
path: '**',
redirectTo: '/pages/dashboard'
},
];
<nb-user showInitials
size="medium"
name="Dmitry Nehaychik"
title="Nebular Dev"
badgeText="17"
badgeStatus="danger"
badgePosition="bottom right">
</nb-user>
<nb-reveal-card>
<nb-card-front>
<nb-card><nb-card-body>Front Card</nb-card-body></nb-card>
</nb-card-front>
<nb-card-back>
<nb-card><nb-card-body>Back Card</nb-card-body></nb-card>
</nb-card-back>
</nb-reveal-card>
data.array.push(newValue);
data.array[i].prop1 = 'new value';
@Injectable()
export class Store {
@observable state: any;
@computed get aggregation() {...}
@action changeFunc(data) {...}
}
@Component({
selector: 'app-component',
templateUrl: './component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class Component {
constructor(public store: Store) {}
changeFunc() {...}
}
<div *mobxAutorun="{ dontDetach: true }">
...
</div>
@observable
state: any = {
spendings: [],
spendingTypes: []
};
<div *mobxAutorun="{ dontDetach: true }">
...
</div>