JavaScript Namespace

后端 未结 11 1473
暗喜
暗喜 2020-12-15 07:25

I want to create a global namespace for my application and in that namespace I want other namespaces:

E.g.

Dashboard.Ajax.Post()

Dashboard.RetrieveC         


        
11条回答
  •  独厮守ぢ
    2020-12-15 08:02

    I believe the module pattern might be right up your alley. Here's a good article regarding different module patterns.

    http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth

提交回复
热议问题