from what i understand, it explicitly allows angular to recognize your custom components. I was getting this error in Ionic v3 and this still seems to be a working solution for v4.
Have you been able to work with custom components without these added lines?