FAQ's (Frequently Asked Questions)

Below are the most commonly asked questions about this template. We recommend you to please go through the following questions before submitting any support request, may be you will find your problem already had an answer below:

Do you provide git repo access for this template?

Yes, you can submit a request to access our git repo through our email(support@theironnetwork.org). We will provide you with the access to have a look of the previous versions and the latest version.

Do I have an inside look of your folder structure and other components?

Yes, you can check them by following the link below:

Does the template includes PSD and sketch files?

No, we don't have any psd files for it.

How to set default layout in your template from any other layout?

From Horizontal Menu to Default Layout

To disable horizontal menu go to src->app->service->core and open core.service.ts file and change the value of horizontalStatus & horizontalSizeStatue to false.

core.service.ts
export class CoreService {
	...
	horizontalStatus : boolean = false;
	horizontalSizeStatue : boolean =  false;
	...
}

From Mini Sidebar to Default Layout

To disable mini sidebar layout, go to src->app->service->core and open core.service.ts file and change the value of collapseSidebar to false.

core.service.ts
export class CoreService {
	...
	collapseSidebar : boolean = false;
	...
}

How Can I Integrate API in Gene theme?

Rest API Integration Steps:

  1. Add HTTP Client Module: Under the src/app/app.module.ts

import { HttpClientModule } from '@angular/common/http';

   imports: [
      HttpClientModule
   ],

2. Create an ApiService to communicate with our REST API back end:

ng generate service Api--module app.module.ts

3. Open src/app/api.service.ts:

import { Injectable } from '@angular/core';
   import { Http } from '@angular/http';
   import 'rxjs/add/operator/map';

   const API_URL = 'http://localhost:3000';

   interface Response {
     response : any; 
   }

   @Injectable()
   export class ApiService {

      constructor(private http: Http) { }

      // API: GET /todos
      public getAllTodos(){
        return this.http.get<Response>(API_URL+"todos").pipe(map(response => response.response));
      }
   }

4. Use this service file into your component link this:

 import {ApiService} from './api.service';

   @Component({
     selector: 'app-root',
     templateUrl: './app.component.html',
     styleUrls: ['./app.component.css'],
     providers: [ApiService]
   })

   export class AppComponent {

      apiResponse : any;
      constructor(
         private apiService: ApiService) {
         this.apiService.getAllTodos()
         .subscribe(res => {this.apiResponse = res},
                    err => console.log(err),
                    ()  => console.log(this.apiResponse)
                  );
      }
   }

This is simple example for integrate the API in angular, For more information plase check the below link:

https://www.sitepoint.com/angular-rxjs-create-api-service-rest-backend/

Last updated