akveo / akveo/ngx-admin

Module not found: Error: Can't resolve 'ng2-smart-table/lib/lib/data-source/server/server-source.conf'

Aperta
#5,666 0 commenti 3 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
25.7k
Fork
7.9k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Issue type

**I'm submitting a ...**
* [x] bug report

### Issue description
Rebuilding a `BaseSmartListComponent` (which works perfectly in previous versions of ngx-admin), so it can be extended to implement smart lists data in a simpler way, this error is being produced.

**Current behavior:**
**ServerSourceConf class can not be resolved.**: Module not found: Error: Can't resolve 'ng2-smart-table/lib/lib/data-source/server/server-source.conf'

**Expected behavior:**
Succesful compilation and component extensions without problem.

**Steps to reproduce:**
1. Import:
```ts
import { ServerSourceConf } from 'ng2-smart-table/lib/lib/data-source/server/server-source.conf';
```
2. Declare:
```ts
export class BaseSmartListComponent {
// ...
sourceConf: ServerSourceConf;
// ...
}
```
3. Create an istance of `ServerSourceConf`:
```ts
this.sourceConf = new ServerSourceConf( {
endPoint: `${this.endPoint}`,
dataKey: 'content',
totalKey: 'totalElements',
pagerPageKey: 'page',
pagerLimitKey: 'size',
filterFieldKey: '#field#',
sortFieldKey: 'sort',
} );
```
4. Declare component to be part of some module:
```ts
// ...
declarations: [
PagesComponent,
BaseSmartListComponent,
],
})
export class PagesModule {
}
```

**Component Declaration example (fragment):**
```ts
import { ServerSourceConf } from 'ng2-smart-table/lib/lib/data-source/server/server-source.conf';

@Component( {
selector: 'ngx-base-list-component',
template: `


ngx-base-list-component works!


`,
} )
export class BaseSmartListComponent {

selectedReg: any;

source: ServerDataSource;
sourceConf: ServerSourceConf;

settings: any = {
...
};

constructor( protected authService: AuthService, protected http: HttpClient ) {
// ...
}

// ...

}
```

### Other information:

**npm, node, OS, Browser**
``` sh
$ node --version
v10.13.0

$ npm --version
6.4.1
```
OS: MacOS (darwin x64, El Capitan)
Browser: Chrome/Safari/Firefox

**Angular, Nebular**
Nebular: 5.0.0
Angular: 9.0.4
ngx-admin: 5.0.0

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.