@Heenachhabra123 wrote:
import { NavController } from ‘@ionic/angular’;
import { Component, OnInit } from ‘@angular/core’;
import { HttpClient, HttpHeaders, HttpParams } from ‘@angular/common/http’;
import { DataService } from ‘…/auth/data.service’;
import { Injectable } from ‘@angular/core’;
import { BehaviorSubject, Observable, throwError as observableThrowError, of } from ‘rxjs’;
import { catchError, map } from ‘rxjs/operators’;
import { environment } from ‘…/…/environments/environment’;
import * as $ from ‘jquery’;
import * as cors from “cors”;
import {RequestOptions, Request, RequestMethod} from ‘@angular/http’;export interface IAuthService {
getContent(): Observable;
getfaq(): Observable;
}const HttpUploadOptions = {
headers: new HttpHeaders({ “Accept”: “application/json” })
}@Injectable({
providedIn: ‘root’
})@Component({
selector: ‘app-tab2’,
templateUrl: ‘tab2.page.html’,
styleUrls: [‘tab2.page.scss’]
})
export class Tab2Page implements OnInit {shownGroup = null;
toggleGroup(group) {
if (this.isGroupShown(group)) {
this.shownGroup = null;
} else {
this.shownGroup = group;
}
};
isGroupShown(group) {
return this.shownGroup === group;
};constructor(private dataService: DataService) {
var products = []; this.dataService.getfaq().subscribe((res : any) => { this.products = res.response; });
}
ngOnInit() {
}
}
Posts: 1
Participants: 1