-
Notifications
You must be signed in to change notification settings - Fork 61
Closed
Description
I might be doing it wrong, but following the steps layed out in http://www.angularplayground.it/docs/getting-started/angular-cli I yield the following when running npm run playground:
[ng serve]:
ERROR in /my_project/src/sandboxes.ts (14,14): Expression expected.
ERROR in /my_project/src/sandboxes.ts (14,20): Unreachable code detected.
ERROR in /my_project/src/sandboxes.ts (14,88): Property 'then' does not exist on type '"./app/my-widget/my-widget.component.sandbox"'.
The file in src/sandboxes.ts looks like
export function getSandboxMenuItems() {
return [{
'key': './app/my-widget/my-widget.component.sandbox',
'searchKey': 'MyWidgetComponent',
'name': 'MyWidgetComponent',
'label': '',
'scenarioMenuItems': [{'key': 1, 'description': 'with simple text'}]
}];
}
export function getSandbox(path: string) {
switch (path) {
case './app/my-widget/my-widget.component.sandbox':
return import('./app/my-widget/my-widget.component.sandbox').then(sandbox => { return sandbox.default.serialize('./app/my-widget/my-widget.component.sandbox'); });
}
}
I did change the module to esnext in src/tsconfig.app.json.
Versions:
$ cat package-lock.json | grep @angular/cli
"@angular/cli": {
"resolved": "https://registry.npmjs.org//@angular/cli/-/cli-1.5.0.tgz",
$ cat package-lock.json | grep angular-playground
"angular-playground": {
"resolved": "https://registry.npmjs.org/angular-playground/-/angular-playground-3.0.0.tgz",
Metadata
Metadata
Assignees
Labels
No labels