implemented `init` method.
bug fixed that throw an error if component has child component.