fix issues Attempt to use a destroyed view: detectChanges in renderValue


I have an error of detectChanges in renderValue function, to solve this problem just check view is destroyed before call detectChanges function.
Coverage increased (+0.006%) to 96.259% when pulling eae7580149f746b3de86855cdae4fbf8ff603249 on perjerz3434:master into 0b8f55939e2e84886e5eeebcd553473a400c25be on mseemann:master.
hi. thx for your contribution.
the solution for your problem may solve your problem but i think it isn't a general solution. The question is: why is the renderValue method is called after the component is destroyed.
I would suggest do the following:
- write a test that reproduces the error
- find the reason why the renderValue method is called after the component is destroyed
- fix this problem - e.g. make the test pass
Let me know if you need any help.
When mdl-select is used with *ngIf, it is possible to cd.detectChanges() with componet has already destroyed which produce a bug.