use inject, adjust properties order
This commit is contained in:
parent
57fb00f685
commit
dc1ed8ffee
|
|
@ -15,6 +15,17 @@
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<mat-form-field appearance="outline">
|
||||||
|
<mat-label>Permission name</mat-label>
|
||||||
|
<input matInput [(ngModel)]="particleData.permission" placeholder="Enter permission">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field appearance="outline">
|
||||||
|
<mat-label>Package name</mat-label>
|
||||||
|
<input matInput [(ngModel)]="particleData.package_permission" placeholder="Enter package permission">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field appearance="outline">
|
||||||
<mat-label>Particle Type</mat-label>
|
<mat-label>Particle Type</mat-label>
|
||||||
|
|
@ -37,17 +48,6 @@
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
|
||||||
<mat-form-field appearance="outline">
|
|
||||||
<mat-label>Permission name</mat-label>
|
|
||||||
<input matInput [(ngModel)]="particleData.permission" placeholder="Enter permission">
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field appearance="outline">
|
|
||||||
<mat-label>Package name</mat-label>
|
|
||||||
<input matInput [(ngModel)]="particleData.package_permission" placeholder="Enter package permission">
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field appearance="outline">
|
||||||
<mat-label>Random Offset</mat-label>
|
<mat-label>Random Offset</mat-label>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component, inject} from '@angular/core';
|
||||||
import {MatCard, MatCardContent, MatCardHeader, MatCardTitle} from "@angular/material/card";
|
import {MatCard, MatCardContent, MatCardHeader, MatCardTitle} from "@angular/material/card";
|
||||||
import {MatCheckbox} from "@angular/material/checkbox";
|
import {MatCheckbox} from "@angular/material/checkbox";
|
||||||
import {MatFormField, MatInput, MatLabel} from "@angular/material/input";
|
import {MatFormField, MatInput, MatLabel} from "@angular/material/input";
|
||||||
|
|
@ -24,17 +24,14 @@ import {ParticleManagerService} from '../../services/particle-manager.service';
|
||||||
MatSelect,
|
MatSelect,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
FormsModule
|
FormsModule
|
||||||
],
|
],
|
||||||
templateUrl: './properties.component.html',
|
templateUrl: './properties.component.html',
|
||||||
styleUrl: './properties.component.scss'
|
styleUrl: './properties.component.scss'
|
||||||
})
|
})
|
||||||
export class PropertiesComponent {
|
export class PropertiesComponent {
|
||||||
public particleTypes = Object.values(ParticleType);
|
public particleTypes = Object.values(ParticleType);
|
||||||
|
|
||||||
constructor(
|
private readonly particleManagerService = inject(ParticleManagerService);
|
||||||
private particleManagerService: ParticleManagerService,
|
|
||||||
) {
|
|
||||||
}
|
|
||||||
|
|
||||||
public get particleData(): ParticleData {
|
public get particleData(): ParticleData {
|
||||||
return this.particleManagerService.getParticleData();
|
return this.particleManagerService.getParticleData();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user