[Angular-Scaled web] 2. Architecture sub-modules
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
- create
- bookmarks
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
- models
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的更多相关文章
- 混合开发 Hybird Ionic Angular Cordova web 跨平台 MD
Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...
- 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 ...
- vue,react,angular三大web前端流行框架简单对比
常用的到的网站 vue学习库: https://github.com/vuejs/awesome-vue#carousel (json数据的格式化,提高本地测试的效率) json在线编辑: http: ...
- Understanding Spring Web Application Architecture: The Classic Way--转载
原文地址:http://www.petrikainulainen.net/software-development/design/understanding-spring-web-applicatio ...
- 开始在web中使用JS Modules
本文由云+社区发表 作者: 原文:<Using JavaScript modules on the web> https://developers.google.com/web/funda ...
- Translate Angular >=4 with ngx-translate and multiple modules
原文:https://medium.com/@lopesgon/translate-angular-4-with-ngx-translate-and-multiple-modules-7d9f0252 ...
- BUILDING ANGULAR APPS USING FLUX ARCHITECTURE
Flux is an architectural pattern based on unidirectional data flow. Although it is originated in the ...
- angular模拟web API
现象:angular Cannot find module 'angular-in-memory-web-api'报错找不动“angular-in-memory-web-api”模块 解决:1.控制台 ...
- [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 ...
随机推荐
- Codeforces 1090J $kmp+hash+$二分
题意 给出两个字符串\(s\)和\(t\),设\(S\)为\(s\)的任意一个非空前缀,\(T\)为\(t\)的任意一个非空前缀,问\(S+T\)有多少种不同的可能. Solution 看了一圈,感觉 ...
- apt-get出现无法定位安装包问题解决
这个问题出现在sources.list上 编辑/etc/apt/sources.list下的文件 找到检查你的存储库是否正确 你可以在以下页面找到不同版本 Kali Linux 的存储库:http:/ ...
- ACM需要掌握算法
数据结构 栈,队列,链表 哈希表,哈希数组 堆,优先队列 双端队列 可并堆 左偏堆 二叉查找树 Treap 伸展树 并查集 集合计数问题 二分图的识别 平衡二叉树 二叉排序树 线段树 一维线段树 二维 ...
- CDOJ 838 母仪天下 树状数组 (2014数据结构专题
母仪天下 Time Limit: 1 Sec Memory Limit: 162 MB 题目连接 http://acm.uestc.edu.cn/#/problem/show/838 Descrip ...
- hdu 刷题记录
1007 最近点对问题,采用分治法策略搞定 #include<iostream> #include<cmath> #include<algorithm> using ...
- GoAhead2.5移植到ARM教程
1.下载GoAhead2.5 下载地址:https://github.com/embedthis/goahead/releases?after=v3.1.2 2.编译 先解压到虚拟机的/opt目录下, ...
- 关于多重嵌套的JSON数据解析
最近项目中需要封装一套复杂的数据模型返回给前端,大致就是一个用户会有多笔订单,每个订单下可能会有多笔保单, 大致的数据模型如下: 为了方面描述,先看一下一个用户下有一条订单,一条订单下有一个保险订单的 ...
- 在WAMPSERVER下增加多版本的PHP(PHP5.3,PHP5.4,PHP5.5)完美支持。
WAMPServer可以让开发者在Windows系统下快速搭建WAMP环境,它支持多版本的Apache.MySQL.PHP之间的相互切换,互不影响,对于PHPer开发者来讲极为方便快速. 以下是在WA ...
- JavaScript操作DOM(动态表格处理)
<html> <title>动态处理表格数据</title> <head> <script type="text/javascript& ...
- CentOS 6.9配置EPEL源
简介: EPEL是一个由特别兴趣小组创建.维护并管理的,针对 红帽企业版 Linux(RHEL)及其衍生发行版(比如 CentOS.Scientific Linux.Oracle Enterprise ...