mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +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 {NotFoundComponent} from './miscellaneous/not-found/not-found.component';
|
||||
import {PromotionComponent} from './promotion/promotion.component';
|
||||
import {ServerExamplesComponent} from './sample/server-examples.component';
|
||||
|
||||
const routes: Routes = [{
|
||||
path: '',
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ export class PromotionComponent implements OnInit {
|
|||
ngOnInit(): void {
|
||||
this.service.getPromotion().subscribe((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';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PromotionService {
|
||||
constructor(private http: HttpClient) {
|
||||
|
|
@ -14,12 +14,6 @@ export class PromotionService {
|
|||
|
||||
getPromotion(): Observable<any> {
|
||||
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(
|
||||
map(this.extractData),
|
||||
catchError(this.handleError),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue