Midburn/spark

Clean global scope in all controllers.

Aberta

#980 aberto em 29 de nov. de 2018

 (1 comentário) (0 reação) (1 responsável)JavaScript (44 forks)auto 404
Cleanupgood first issue

Métricas do repositório

Stars
 (18 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Overview of the problem

We have several functions declared globally in controller files. This can create issues hard to anticipate and solve.

Description

  1. We need to move all functions into scope. image image
  2. We need to make sure the functions aren't used in any other file (if so, we should create an AngularJS service to be shared between the controllers)
  3. Sanity after the cleanup - check most screens and buttons don't raise exceptions related to missing functions.

Expected behavior

Functions should be scoped

Actual behavior

Functions are declared outside of AngularJS's controllers call back

Guia do colaborador