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.

Map piped into filter as _MapChangeRecord rather than Map #715

@chalin

Description

@chalin

Running the following HTML snippet

  <p>{{ {"a":1} | json }}</p>

fails stating that the object is not encodable. If you print the type of the argument received by the json filter (see below), then it shows

jsonObj is _MapChangeRecord

rather than showing jsonObj as a Map. The same snippet works under angular 0.9.8.


@NgFilter(name:'json')
class JsonFilter {
  call(jsonObj) {
    print("jsonObj is ${jsonObj.runtimeType}");
    return JSON.encode(jsonObj);
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions