Midburn/spark

Clean global scope in all controllers.

开放

#980 创建于 2018年11月29日

 (1 条评论) (0 个反应) (1 位负责人)JavaScript (44 个派生)auto 404
Cleanupgood first issue

仓库指标

星标
 (18 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南