Datepicker breaks the application on navigation
- Lenguaje dominante
- TypeScript
- Estrellas
- 25.7k
- Forks
- 7.9k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
### Issue type
**I'm submitting a ...** (check one with "x")
* [ ] bug report
Regarding datepicker
### Issue description
If we navigate from current page which has datepicker to another page then application breaks.
**Current behavior:**
Navigation from current page containing datepicker to another page breaks application.
**Expected behavior:**
Should not break.
**Steps to reproduce:**
Go to page which has datepicker
Navigate away from the page to another page.
application breaks
**Related code:**
insert short code snippets here
```
### Other information:
**Browser
Chrome
**Description of Error
core.js:15724 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'destroy' of undefined
TypeError: Cannot read property 'destroy' of undefined
at NbDatepickerComponent.push../node_modules/@nebular/theme/components/datepicker/datepicker.component.js.NbBasePicker.ngOnDestroy (datepicker.component.js:146)
at callProviderLifecycles (core.js:22422)
at callElementProvidersLifecycles (core.js:22390)
at callLifecycleHooksChildrenFirst (core.js:22380)
at destroyView (core.js:23442)
at callViewAction (core.js:23568)
at execEmbeddedViewsAction (core.js:23511)
at destroyView (core.js:23440)
at callViewAction (core.js:23568)
at execEmbeddedViewsAction (core.js:23511)
at resolvePromise (zone.js:814)
at resolvePromise (zone.js:771)
at zone.js:873
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:17290)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:500)
at invokeTask (zone.js:1540)
**Angular, Nebular**
```
```
"@angular/animations": "^7.2.11",
"@angular/cdk": "^7.3.6",
"@angular/common": "^7.2.11",
"@angular/compiler": "^7.2.11",
"@angular/core": "^7.2.11",
"@angular/forms": "^7.2.11",
"@angular/http": "^7.2.11",
"@angular/platform-browser": "^7.2.11",
"@angular/platform-browser-dynamic": "^7.2.11",
"@angular/router": "^7.2.11",
"@nebular/bootstrap": "3.4.2",
"@nebular/security": "3.4.2",
"@nebular/theme": "3.4.2",
"@ng-bootstrap/ng-bootstrap": "^4.0.0",
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.