Common models will be a sub models for category and bookmarks. Because they are used everywhere.

For bookmarks edit and create, all they need is a common sub module.

bookmarks.js needs create and edit modules and two common sub modules.

category.js needs common categories sub module.

Then in start.js, we include two main features: categories and bookmarks modules.

app

  • category

    • bookmarks

      • create

        • bookmarks-create.js
angular.module('categories.bookmarks.create', [
'eggly.models.bookmarks'
])
        • bookmarks-create.tmpl.html
      • edit
        • bookmarks-edit.js
angular.module('categories.bookmarks.edit', [
'eggly.models.bookmarks'
])
        • bookmarks-edit.tmpl.html
      • bookmarks.js
angular.module('categories.bookmarks', [
'categories.bookmarks.edit', //bookmarks for edit
'categories.bookmarks.create', //bookmarks for create
'eggly.models.categories', //common model for categories
'eggly.models.bookmarks' //common model for bookmarks
]);
      • bookmarks.tmpl.html
    • category.js
angular.module('categories', [
'eggly.models.categories' //add common models for categories
])
    • category.tmpl.html
  • common
    • models

      • category-model.js
angular.module('eggly.models.categories', []);
      • bookmarks-model.js
angular.module('eggly.models.categories', []);
  • app.start.js
angular.module('Eggly', [
'categories', // all models included by categories will also be transfered to main model
'categories.bookmarks'
])

[Angular-Scaled web] 2. Architecture sub-modules的更多相关文章

  1. 混合开发 Hybird Ionic Angular Cordova web 跨平台 MD

    Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...

  2. What is Web Application Architecture? How It Works, Trends, Best Practices and More

    At Stackify, we understand the amount of effort that goes into creating great applications. That’s w ...

  3. vue,react,angular三大web前端流行框架简单对比

    常用的到的网站 vue学习库: https://github.com/vuejs/awesome-vue#carousel (json数据的格式化,提高本地测试的效率) json在线编辑: http: ...

  4. Understanding Spring Web Application Architecture: The Classic Way--转载

    原文地址:http://www.petrikainulainen.net/software-development/design/understanding-spring-web-applicatio ...

  5. 开始在web中使用JS Modules

    本文由云+社区发表 作者: 原文:<Using JavaScript modules on the web> https://developers.google.com/web/funda ...

  6. Translate Angular >=4 with ngx-translate and multiple modules

    原文:https://medium.com/@lopesgon/translate-angular-4-with-ngx-translate-and-multiple-modules-7d9f0252 ...

  7. BUILDING ANGULAR APPS USING FLUX ARCHITECTURE

    Flux is an architectural pattern based on unidirectional data flow. Although it is originated in the ...

  8. angular模拟web API

    现象:angular Cannot find module 'angular-in-memory-web-api'报错找不动“angular-in-memory-web-api”模块 解决:1.控制台 ...

  9. [Angular-Scaled web] 1. Architecture and file structure

    We build a project according to its features or based on simple MVC structure. Put all controller in ...

随机推荐

  1. loj#2718. 「NOI2018」归程

    题目链接 loj#2718. 「NOI2018」归程 题解 按照高度做克鲁斯卡尔重构树 那么对于询问倍增找到当前点能到达的高度最小可行点,该点的子树就是能到达的联通快,维护子树中到1节点的最短距离 s ...

  2. [BZOJ1815&BZOJ1488]有色图/图的同构(Polya定理)

    由于有很多本质相同的重复置换,我们先枚举各种长度的点循环分别有多少个,这个暴搜的复杂度不大,n=53时也只有3e5左右.对于每种搜索方案可以轻易求出它所代表的置换具体有多少个. 但我们搜索的是点置换组 ...

  3. Git版本管理工具对比(GitBash、EGit、SourceTree)

    Git管理工具对比(GitBash.EGit.SourceTree) GitBash是采用命令行的方式对版本进行管理,功能最为灵活强大,但是由于需要手动输入希望修改的文件名,所以相对繁琐. EGit是 ...

  4. bzoj 4017 子序列和的异或以及异或的和

    位运算很好的一个性质是可以单独每一位考虑..... 题解请看:http://blog.csdn.net/skywalkert/article/details/45401245 对于异或的和,先枚举位, ...

  5. Loj10164 数字游戏1

    题目描述 科协里最近很流行数字游戏.某人命名了一种不降数,这种数字必须满足从左到右各位数字成小于等于的关系,如 123,446.现在大家决定玩一个游戏,指定一个整数闭区间 [a,b][a,b][a,b ...

  6. Codeforces Round #357 (Div. 2) B. Economy Game 水题

    B. Economy Game 题目连接: http://www.codeforces.com/contest/681/problem/B Description Kolya is developin ...

  7. 数据是企业的无价財富——爱数备份存储柜server的初体验(图文)

    非常早就像上这样一套数据备份系统,每天採用原来的软件备份加手动备份的方式,总有些不是太方便的地方. 加上企业规模的不断扩大,系统的增多,业务数据也日显重要.容不得半点中断和数据丢失.这不,出于对系统数 ...

  8. Hello World on Impala

    Cloudera Impala 官方教程 <Impala Tutorial>,解说了Impala一些基本操作,但操作步骤前后缺少连贯性,本文节W选<Impala Tutorial&g ...

  9. Pig系统分析(5)-从Logical Plan到Physical Plan

    Physical Plan生成过程 优化后的逻辑运行计划被LogToPhyTranslationVisitor处理,生成物理运行计划. 这是一个经典的Vistor设计模式应用场景. 当中,LogToP ...

  10. SpringBoot集成RabbitMQ并实现消息确认机制

    原文:https://blog.csdn.net/ctwy291314/article/details/80534604 RabbitMQ安装请参照RabbitMQ应用 不啰嗦直接上代码 目录结构如下 ...