aurelia/documentation

Sample code is is flawed? Untested?

SolidStateLEDLighting opened this issue · 3 comments

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;

}
}

  1. You omitted the DialogController import statement.
  2. What is the member "answer" doing here? Is this a flaw or am I missing the understanding on what it is used for?
  3. Again, code on entire page will not translate to TS examples.

@PWKad Can you look at this?

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.

I think this can be closed.
the link in the issue is no longer active - because this section was re-written.