/** * This file is part of Anis Client. * * @copyright Laboratoire d'Astrophysique de Marseille / CNRS * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ import { Component } from '@angular/core'; import { Store } from '@ngrx/store'; import { Instance } from 'src/app/metamodel/models'; import * as instanceActions from 'src/app/metamodel/actions/instance.actions' @Component({ selector: 'app-new-instance', templateUrl: 'new-instance.component.html' }) export class NewInstanceComponent { constructor(private store: Store<{ }>) { } addNewInstance(instance: Instance) { this.store.dispatch(instanceActions.addInstance({ instance })); } }