FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

function isModuleDefined · Issue #16569 · angular/angular.js · GitHub

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

Repository navigation

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

function isModuleDefined #16569

Description

I'm submitting a ...

  • bug report
  • feature request
  • other

Current behavior:
When redefine module, orgin module lost.

Expected / new behavior:
Override a module, or do something whether the modele is defined or not.

Minimal reproduction of the problem with instructions:
none

AngularJS version: 1.x.y
all

Browser: [all]

Anything else:
before the code:

      if (requires && modules.hasOwnProperty(name)) {
        modules[name] = null;
      }

add:

      if(isBoolean(requires)){
        return modules.hasOwnProperty(name);
      }

then I can user like this:

      if(angular.module('my-module', true)){
        // codes
      }
      else{
        // codes if not exit module 'my-module'
      }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL