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.

Add ProtoAware to change detection #917

Closed
@mhevery

Description

@mhevery

In order to support ng-repeat and to not have ProtoMap which forwards to parent map we need a class which can at 'compile-time' answer if we can dereference a nam.

abstract class ProtoAware {
  Object parent;
  bool hasProperty(String name);
  operator[] 
}

This way a repeater can define:

class RepeatContext extends ProtoAware {
  Object parent;
  String itemName;
  hasProperty(name) => name == itemName || name == '$index';
}

This way the change detection system on assignment can query the object and determine if the object understand a field. If it does not it checks the parent. This way it is possible to emulate prototypical inheritance without reflection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions