Sample code is is flawed? Untested?
SolidStateLEDLighting opened this issue · 3 comments
SolidStateLEDLighting commented
http://aurelia.io/hub.html#/doc/article/aurelia/dialog/latest/dialog-basics/5
Please examine the sample code on your page:
export class Prompt {
static inject = [DialogController];
constructor(controller){
this.controller = controller;
this.answer = null;
controller.settings.lock = false;
controller.settings.centerHorizontalOnly = true;
}
}
- You omitted the DialogController import statement.
- What is the member "answer" doing here? Is this a flaw or am I missing the understanding on what it is used for?
- Again, code on entire page will not translate to TS examples.
EisenbergEffect commented
@PWKad Can you look at this?
plwalters commented
The code is fine and has been tested. Please refer to the documentation if there are questions regarding return values and usage and such.
We can add an import statement no big deal. TypeScript translations welcome. Tracking at aurelia/dialog#305 , please close this issue.
avrahamcool commented
I think this can be closed.
the link in the issue is no longer active - because this section was re-written.