Decouple Data From Components / Make ngx-admin installable
- 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 ...** (check one with "x")
* [ ] bug report
* [x] feature request
* [ ] question about the decisions made in the repository
### Issue description
**Current behavior:**
I'm in the process of developing some apps in an nx monorepo. I've put most of the ngx-admin components in a lib, which I import into the apps in the monorepo.
Many of the components have data tightly coupled with them. `tree-grid.component.ts` is an example. This forces developers to modify the template/theme source files.
The main concern here is that developers on my team shouldn't be able to easily modify ngx-admin code. Ideally, they should import the components into the apps and perform overrides there.
Thinking about it like bootstrap is easier. I can install bootstrap, import it, then add any overrides I want to my own `styles.scss`. I don't need to create a "bootstrap" lib, copy the source code over, and edit it in place.
Below is a loose example of my project's structure.
```
workspace/
├── apps/
│ ├── user/
│ └── admin/
├── libs/
│ ├── user/
│ │ └── data-access/
│ ├── admin/
│ │ └── data-access/
│ └── shared/
│ └── templates/
│ └── ngx-admin/ # would work better as an package on npm
```
**Desired behavior:**
Ideally, I would be able to `ng add ngx-admin` (or even just `npm install`) and import the components that way, rather than creating a lib for them. This would ensure developers would use the components as they were designed and modifications/overrides would happen in the apps or in custom themes.
In order for this to be possible, components would need to be modified to take `@Input` values rather than housing the data themselves.
**Steps to reproduce:**
N/A
**Related code:**
N/A (though I could spin one up if this ticket gets any attention :) )
### Other information:
**npm, node, OS, Browser**
- Windows 10
- Chrome, Edge
**Angular, Nebular**
- @angular/core: 12.0.0
- @nebular/theme: ^7.0.0
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.