Incorrect theme
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25.7k
- Forks
- 7.9k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Issue type
**I'm submitting a ...** (check one with "x")
* [x] bug report
* [ ] feature request
* [ ] question about the decisions made in the repository
### Issue description
**Current behavior:**
I've set a localStorage and tried to set the name of theme in `theme.modules.ts`:
```
...
const NB_THEME_PROVIDERS = [
...NbThemeModule.forRoot(
{
name: ((localStorage.getItem('theme') === 'corporate' || localStorage.getItem('theme') === 'default') ? localStorage.getItem('theme') : 'cosmic')
},
...
];
...
```
But no one theme is load (not even the 'cosmic' theme).
In that issue, I insert 2 prints showing how the error occurs: https://github.com/akveo/ngx-admin/issues/1980
This happens only on production mode
**Expected behavior:**
Change theme if a localStorage's item has setted (or other way).
### Other information:
**npm, node, OS, Browser**
```
Node, npm: v9.11.1 and 5.6.0
OS: Windows 8.1
Browser: Chrome
```
**Angular, Nebular**
```
Angular: 7.2.3
Nebular: 3.0.0
```
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.