aurelia / documentation

The documentation for Aurelia.
MIT License
105 stars 111 forks source link

Sample code is is flawed? Untested? #347

Closed SolidStateLEDLighting closed 5 years ago

SolidStateLEDLighting commented 7 years ago

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.

EisenbergEffect commented 7 years ago

@PWKad Can you look at this?

plwalters commented 7 years ago

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 https://github.com/aurelia/dialog/issues/305 , please close this issue.

avrahamcool commented 5 years ago

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