Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Root component wrap div element #7

Closed
uznam8x opened this issue Jul 3, 2020 · 1 comment
Closed

fix: Root component wrap div element #7

uznam8x opened this issue Jul 3, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@uznam8x
Copy link

uznam8x commented Jul 3, 2020

MainApplication.js

export default class MainApplication extends UIElement {
  components() {}
  template() {
    return '<div class="main"></div>;
  }
}

index.js

App.start({
  components: { MainApplication },
  template: `<MainApplication />`,
  container: document.getElementById('app'),
});

template

Rendered

<div id="app">
  <div> <-- why created element?
    <div class="main"></div>
  </div>
</div>

Unintentional empty div element is cause confusion.

e.g
div.#app { height: 100% }
@uznam8x uznam8x changed the title Root component wrap div element issue: Root component wrap div element Jul 3, 2020
@uznam8x uznam8x changed the title issue: Root component wrap div element fix: Root component wrap div element Jul 3, 2020
@easylogic
Copy link
Owner

이건 하위 공백 템플릿 넣어도 되도록 구조를 다시 맞출게요.

@easylogic easylogic self-assigned this Jul 3, 2020
@easylogic easylogic added the bug Something isn't working label Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants