mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 16:30:13 +01:00
re-commit revice cz Lint
This commit is contained in:
parent
db8b04ae3f
commit
d07d68e0a1
3 changed files with 1 additions and 9 deletions
|
|
@ -4,7 +4,6 @@ import {NgModule} from '@angular/core';
|
||||||
import {PagesComponent} from './pages.component';
|
import {PagesComponent} from './pages.component';
|
||||||
import {NotFoundComponent} from './miscellaneous/not-found/not-found.component';
|
import {NotFoundComponent} from './miscellaneous/not-found/not-found.component';
|
||||||
import {PromotionComponent} from './promotion/promotion.component';
|
import {PromotionComponent} from './promotion/promotion.component';
|
||||||
import {ServerExamplesComponent} from './sample/server-examples.component';
|
|
||||||
|
|
||||||
const routes: Routes = [{
|
const routes: Routes = [{
|
||||||
path: '',
|
path: '',
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,6 @@ export class PromotionComponent implements OnInit {
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.service.getPromotion().subscribe((result) => {
|
this.service.getPromotion().subscribe((result) => {
|
||||||
this.source = Object.assign([], result);
|
this.source = Object.assign([], result);
|
||||||
console.log(this.source);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import {HttpErrorResponse, HttpHeaders} from '@angular/common/http';
|
||||||
import { PromotionList } from '../../@core/data/promotion';
|
import { PromotionList } from '../../@core/data/promotion';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class PromotionService {
|
export class PromotionService {
|
||||||
constructor(private http: HttpClient) {
|
constructor(private http: HttpClient) {
|
||||||
|
|
@ -14,12 +14,6 @@ export class PromotionService {
|
||||||
|
|
||||||
getPromotion(): Observable<any> {
|
getPromotion(): Observable<any> {
|
||||||
const url = 'http://localhost:8011/api/promotions/all';
|
const url = 'http://localhost:8011/api/promotions/all';
|
||||||
const headers = new HttpHeaders({
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
'X-Requested-Url': url,
|
|
||||||
'X-Requested-Method': 'GET',
|
|
||||||
});
|
|
||||||
const options = {headers: headers};
|
|
||||||
return this.http.get(url).pipe(
|
return this.http.get(url).pipe(
|
||||||
map(this.extractData),
|
map(this.extractData),
|
||||||
catchError(this.handleError),
|
catchError(this.handleError),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue