diff --git a/packages/@ember/-internals/routing/lib/system/route.ts b/packages/@ember/-internals/routing/lib/system/route.ts index 7bc7d566c5b..eadeab22396 100644 --- a/packages/@ember/-internals/routing/lib/system/route.ts +++ b/packages/@ember/-internals/routing/lib/system/route.ts @@ -7,7 +7,10 @@ import { Object as EmberObject, typeOf, } from '@ember/-internals/runtime'; -import { EMBER_ROUTING_ROUTER_SERVICE } from '@ember/canary-features'; +import { + EMBER_ROUTING_BUILD_ROUTEINFO_METADATA, + EMBER_ROUTING_ROUTER_SERVICE, +} from '@ember/canary-features'; import { assert, deprecate, info, isTesting } from '@ember/debug'; import { ROUTER_EVENTS } from '@ember/deprecated-features'; import { assign } from '@ember/polyfills'; @@ -2554,4 +2557,10 @@ if (EMBER_ROUTING_ROUTER_SERVICE && ROUTER_EVENTS) { }); } +if (EMBER_ROUTING_BUILD_ROUTEINFO_METADATA) { + Route.reopen({ + buildRouteInfoMetaData() {}, + }); +} + export default Route; diff --git a/packages/@ember/canary-features/index.ts b/packages/@ember/canary-features/index.ts index acc59d8e8a1..f732ccebbb8 100644 --- a/packages/@ember/canary-features/index.ts +++ b/packages/@ember/canary-features/index.ts @@ -17,6 +17,7 @@ export const DEFAULT_FEATURES = { GLIMMER_MODIFIER_MANAGER: null, EMBER_METAL_TRACKED_PROPERTIES: null, EMBER_GLIMMER_ANGLE_BRACKET_INVOCATION: true, + EMBER_ROUTING_BUILD_ROUTEINFO_METADATA: null, }; /** @@ -84,3 +85,7 @@ export const EMBER_GLIMMER_ANGLE_BRACKET_INVOCATION = featureValue( FEATURES.EMBER_GLIMMER_ANGLE_BRACKET_INVOCATION ); export const GLIMMER_MODIFIER_MANAGER = featureValue(FEATURES.GLIMMER_MODIFIER_MANAGER); + +export const EMBER_ROUTING_BUILD_ROUTEINFO_METADATA = featureValue( + FEATURES.EMBER_ROUTING_BUILD_ROUTEINFO_METADATA +);