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

Content will not update #1

Open
rotatingJazz opened this issue Jan 10, 2015 · 0 comments
Open

Content will not update #1

rotatingJazz opened this issue Jan 10, 2015 · 0 comments

Comments

@rotatingJazz
Copy link

Content updates only when didInsertElement gets triggered.

Example

  this.route("static", { path: "static/:page" });
{link-to "static" "page1"} ...
{link-to "static" "page2"} ...
  {{summer-note height=500 btnSize=bs-sm content=model.content focus=true header="Example"}}
  model(params) {
    return this.store.find('static', params.page);
  },

The first time static/page1 and static/page2 load, content displays fine. After that, clicking again (say) page1, the editor will still display page2's content. Furthermore, if you click inside the editor, it will replace page1's content with page2's content.

Workaround

The workaround is to force the Ember Data to query the API again, forcing the outlet to redraw and didInsertElement to re-fire.

  model(params) {
    return this.store.fetch('staticpage', params.page);
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant