Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

AngularDart does not handle expressions with optional parameters correctly #573

@mvuksano

Description

@mvuksano

If there's a component which has the following html

<div ng-click="ctrl.doSomething(true, content:'test')">Hello</div>

And dart part as:

import 'package:angular/angular.dart';

@NgComponent(selector: 'my-component',
    templateUrl: 'component/my_component.html',
    publishAs: 'ctrl')
class MyComponent {
  showSomething(something, {content}) {
    print("SOMETHING: ${something}");
    print("CONTENT: ${content}");
  }
}

The parser doesn't handle this scenario correctly. It treats content part in the above expression as AccessScope, which sounds incorrect. The message that I get is:
"Parser Error: Missing expected ) at column 33 in [ctrl.showSomething(true, content:'test')]"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions