Adding custom ts to cshtml page #6741
-
Hi, The problem:
What is the recommended approach to add a custom ts file and invoke it from the html? In serenity generated pages, a js file seems to be referenced (in /wwwroot/esm folder) and then you can intantiate the class:
In some examples I've seen this:
But I cannot get the js file generated from my ts file :( My question is: More details: The controller method:
The page is displayed ok. The typescript file:
The typescript --watch ignores my file (I've even included it in the tsconfig file) unless it is referenced in one of the "serenity generated ts files". |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
What is the typescript file name? It should end with Page.ts like |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
import { LookupType, ParameterDataTypes, ParameterEditorTypes} from "../../ServerTypes/Reports"; declare var Morris: any; @Decorators.registerClass('Car.Rental.Reports.DynamicReportPage') export class DynamicReportPage extends TemplatedDialog { static initializePage(reportID) {
//some data } |
Beta Was this translation helpful? Give feedback.
What is the typescript file name? It should end with Page.ts like
MyPage.ts