diff --git a/packages/@ember/-internals/glimmer/lib/components/link-to.ts b/packages/@ember/-internals/glimmer/lib/components/link-to.ts index f3e3af24bc2..4ecd873bb83 100644 --- a/packages/@ember/-internals/glimmer/lib/components/link-to.ts +++ b/packages/@ember/-internals/glimmer/lib/components/link-to.ts @@ -199,19 +199,6 @@ import layout from '../templates/link-to'; When transitioning into the linked route, the `model` hook will be triggered with parameters including this passed identifier. - ### Allowing Default Action - - By default the `` component prevents the default browser action by calling - `preventDefault()` to avoid reloading the browser page. - - If you need to trigger a full browser reload pass `@preventDefault={{false}}`: - - ```handlebars - - {{this.aPhotoId.title}} - - ``` - ### Supplying a `tagName` By default `` renders an `` element. This can be overridden for a single use of @@ -380,7 +367,7 @@ const LinkComponent = EmberComponent.extend({ @property loadingClass @type String @default loading - @private + @public **/ loadingClass: 'loading', @@ -391,7 +378,7 @@ const LinkComponent = EmberComponent.extend({ @property disabledClass @type String @default disabled - @private + @public **/ disabledClass: 'disabled', @@ -406,6 +393,26 @@ const LinkComponent = EmberComponent.extend({ **/ replace: false, + /** + Determines whether the `LinkComponent` will prevent the default + browser action by calling preventDefault() to avoid reloading + the browser page. + + If you need to trigger a full browser reload pass `@preventDefault={{false}}`: + + ```handlebars + + {{this.aPhotoId.title}} + + ``` + + @property preventDefault + @type Boolean + @default true + @private + **/ + preventDefault: true, + /** By default this component will forward `href`, `title`, `rel`, `tabindex`, and `target` arguments to attributes on the component's element. When invoked with `{{link-to}}`, you can @@ -555,7 +562,7 @@ const LinkComponent = EmberComponent.extend({ When `true`, interactions with the element will not trigger route changes. @property disabled - @private + @public */ disabled: computed({ get(_key: string): boolean { diff --git a/tests/docs/expected.js b/tests/docs/expected.js index ee4e360480a..5841b904937 100644 --- a/tests/docs/expected.js +++ b/tests/docs/expected.js @@ -418,6 +418,7 @@ module.exports = { 'pauseTest', 'popObject', 'positionalParams', + 'preventDefault', 'promise', 'property', 'pushObject',