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.

Remove NgController and replace with applicationFactory root object #919

Closed
@mhevery

Description

@mhevery

NgController only makes sense for the top-most scope since there is not an implicit component. All children are created in a form of a component which has its own Controller per #914. Because NgController relies on publishAs it is not compatible with the #914 change. So we can bypass this by moving it to applicationFactory

applicationFactory()
  ..rootContextType(HelloWorld)
  ..run();

This is essentially equivalent to

applicationFactory()
  ..module(new Module()..type(Object, HelloWorld))
  ..run();

This way the RootScope's context is set to HelloWorld instance.

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