Last change
on this file was 8423429, checked in by AngelNasev <angel.nasev@…>, 17 months ago |
Add backend and frontend projects
|
-
Property mode
set to
100644
|
File size:
565 bytes
|
Line | |
---|
1 | import {Component, OnInit} from '@angular/core';
|
---|
2 | import {CategoryService} from "../category.service";
|
---|
3 | import {CategoryInterface} from "../categoryInterface";
|
---|
4 |
|
---|
5 | @Component({
|
---|
6 | selector: 'app-category',
|
---|
7 | templateUrl: './category.component.html',
|
---|
8 | styleUrls: ['./category.component.css']
|
---|
9 | })
|
---|
10 | export class CategoryComponent implements OnInit{
|
---|
11 |
|
---|
12 | categories : CategoryInterface[] =[]
|
---|
13 |
|
---|
14 | constructor(private categoryService: CategoryService) {
|
---|
15 | }
|
---|
16 |
|
---|
17 | ngOnInit(): void {
|
---|
18 | this.categoryService.getAllCategories().subscribe(response => this.categories = response)
|
---|
19 | }
|
---|
20 |
|
---|
21 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.