Last active
April 24, 2020 11:06
-
-
Save robertdempsey/6b3fc786a60b87144165b6cbbecab316 to your computer and use it in GitHub Desktop.
Specifies an Angular route using https://github.com/robertdempsey/RouteComponentApp/blob/b35283c808c585ecb0784e085f81b34b55235364/src/app/route-component/route/route.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const displayRoute: RouteData<DisplayComponent> = { | |
path: 'RouteComponentExample/:route_id', | |
component: RouteComponent, | |
data: { | |
component: { | |
type: DisplayComponent, | |
inputs: { | |
inputData: `This is populated with static data from our 'inputs' property in route data` | |
}, | |
outputs: { | |
dataUpdated: function (this: RouteComponent, newData: string) { | |
console.log(this) | |
console.log(newData) | |
} | |
}, | |
routeDataInputs: { | |
componentDescription: 'componentDescription' | |
} | |
} | |
}, | |
resolve: { | |
componentDescription: DescriptionResolver | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment