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

When using $map mode '=' the value should be available in the scope right away #45

Closed
pavelgj opened this issue Jul 18, 2013 · 0 comments

Comments

@pavelgj
Copy link
Contributor

pavelgj commented Jul 18, 2013

Right now:

class FooComponent {
  static var $map = {
    'bar': '='
  };

  FooComponent(Scope scope) {
    expect(scope.bar, isNull);
    scope.$watch(() => scope.bar, (value) {
      if (value != null) { // watcher will fire with a null the first time.
        // use the value.
      }
    });
  }
}

The value should be available on the scope before the component is instantiated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant