I'm using OGX.JS
. I'm trying to add a dynamic route to a view but I can't seem to capture the values. Here is my route.
"mystage/invoices/([a-z0-9]{24})/([a-z0-9]{24}):OML": "invoices"
In my view invoices
I have
this.construct = function(__data, __route_data){
console.log('ROUTE', __route_data);
};
But __route_data is null
CodePudding user response:
Welcome to SO. You have to declare the property of the object in your route such as
"mystage/invoices/propertyA:([a-z0-9]{24})/propertyB:([a-z0-9]{24}):OML": "invoices"
Then it should be available in __route_data
as
__route_data.propertyA
__route_data.propertyB