- add project
All checks were successful
Build Docker Image / Build Docker Image (push) Successful in 6m12s
All checks were successful
Build Docker Image / Build Docker Image (push) Successful in 6m12s
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { Routes, Router, ActivatedRoute } from '@angular/router';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-main-project-content',
|
||||
standalone: false,
|
||||
templateUrl: './main-project-content.html',
|
||||
styleUrl: './main-project-content.css',
|
||||
})
|
||||
export class MainProjectContent implements OnInit {
|
||||
mode: 'add' | 'edit' | 'default' = 'default';
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
let param = this.route.snapshot.paramMap.get('mode');
|
||||
|
||||
if (param === 'add') {
|
||||
this.mode = 'add';
|
||||
} else if (param === 'edit') {
|
||||
this.mode = 'edit';
|
||||
} else {
|
||||
this.mode = 'default';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user