Last active
          February 3, 2025 14:50 
        
      - 
      
- 
        Save mpalourdio/e05b4495de2abeeecfcf92d70e4ef93e to your computer and use it in GitHub Desktop. 
    ng-http-loader - Custom component
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <router-outlet></router-outlet> | |
| <ng-http-loader [entryComponent]="awesomeComponent" ></ng-http-loader> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { Component } from '@angular/core'; | |
| import { AwesomeComponent } from 'my.awesome.component'; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.css'] | |
| }) | |
| export class AppComponent { | |
| public awesomeComponent = AwesomeComponent; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { BrowserModule } from '@angular/platform-browser'; | |
| import { NgModule } from '@angular/core'; | |
| import { FormsModule } from '@angular/forms'; | |
| import { AppComponent } from './app.component'; | |
| import { SecondComponent } from './second/second.component'; | |
| import { FirstComponent } from './first/first.component'; | |
| import { AppRoutingModule } from './app.routing.module'; | |
| import { NgHttpLoaderModule } from 'ng-http-loader'; | |
| import { UploadComponent } from './upload/upload.component'; | |
| import { HttpService } from './http.service'; | |
| import { UploadService } from './upload/upload.service'; | |
| import { HttpClientModule, HttpClientXsrfModule } from '@angular/common/http'; | |
| import { AwesomeComponent } from 'my.awesome.component'; | |
| @NgModule({ | |
| declarations: [ | |
| AppComponent, | |
| FirstComponent, | |
| SecondComponent, | |
| UploadComponent, | |
| ], | |
| imports: [ | |
| BrowserModule, | |
| FormsModule, | |
| HttpClientModule, | |
| HttpClientXsrfModule, | |
| AppRoutingModule, | |
| NgHttpLoaderModule.forRoot(), | |
| ], | |
| providers: [ | |
| HttpService, | |
| UploadService, | |
| ], | |
| bootstrap: [AppComponent] | |
| }) | |
| export class AppModule { | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
thank you, can you made a simple example of AwesomeComponent ?