M
M
mletov2018-04-28 09:44:49
Angular
mletov, 2018-04-28 09:44:49

Is ng2-table friendly with ngx-bootstrap?

I decided to connect ng2-table to the project.
Everything worked, except pagination. Began to google, found instructions that you need to connect the module from ng2-bootstrap.
I'm trying to connect ng2-bootstrap, it says that it is outdated, use ngx-bootstrap.
Okay, I connected ngx-bootstrap, imported modules from it

import { PaginationModule } from './ngx-bootstrap-development/src/pagination/pagination.module';
import { TabsModule } from './ngx-bootstrap-development/src/tabs/tabs.module';

....

@NgModule({
    imports: [BrowserModule, FormsModule, HttpClientModule, PaginationModule, TabsModule, RouterModule.forRoot(appRoutes)],
    declarations: [AppComponent,
                   ProductListComponent, ProductCreateComponent,
        ProductEditComponent, ProductFormComponent, NotFoundComponent,

        ClientCreateComponent, ClientEditComponent, ClientListComponent,

        NgTableComponent, NgTableFilteringDirective, NgTablePagingDirective, NgTableSortingDirective, 
        TableDemoComponent 
    ],
    providers: [ProductService, ClientService], // регистрация сервисов
    bootstrap: [AppComponent]
})

I get the error
ERROR Error: StaticInjectorError[t]:
StaticInjectorError[t]:
NullInjectorError: No provider for t!

Am I doing something wrong or is ng2-table just not friendly with ngx-bootstrap?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
frontender, 2018-04-28
@frontender

https://valor-software.com/ng2-table/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question