javascript - Ember link-to opens link in the same page -
i trying learn ember routes , created simple example app. application template has code-
{{#link-to "testpage"}}go test page.{{/link-to}} {{outlet}}
the testpage created via ember-cli
ember g resource testpage
the testpage template contains simple text "this testpage". when run app, main page correctly shows hyperlink testpage , upon clicking, browser url changes localhost:4200/testpage testpage text shown alongwith "go test page" hyperlink. shouldn't go new page?
also, might note using pod structure in app.
your application template render, regardless of resource/route you've navigated to. top-level resources render in {{outlet}}
have right there.
if want 'go test page.' link replaced, you'll need create separate template it. call index.hbs
, rendered automatically root path.
Comments
Post a Comment