Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Name all anonymous watch functions in Angular #1119

Closed
@IgorMinar

Description

@IgorMinar

Instead of:

$scope.$watch(function() { ... }, function() { ... });

we should use named functions everywhere, like this:

$scope.$watch(function fooWatch() {}, function fooWatchAction() {});

With the name in place, debugging using js debugger is easier and batarang can provide more useful output (e.g. in the perf tab).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions