Skip to content

scope.state - value or function/service? #11

@dylang

Description

@dylang

For state things that are changing like logged in state or the current tab to highlight, what's the best way to make those values accessible in the scope?

For instance:

  • Use values such as scope.isLoggedIn and scope.currentTab. Set those values using scope.watch or after services run that may change the value.
  • Use functions or services attached to the scope such as scope.isLoggedIn() and scope.currentTab() which return values based values from other scrope variables or values within the controller or service closures.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions