[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 ...
随机推荐
- Xshell6和Xftp下载地址,rzsz的使用
官方下载地址:https://cdn.netsarang.net/98f59c09/Xshell-6.0.0076r_beta.exe https://cdn.netsarang.net/98f59c ...
- ShellExecuteA函数
原型: ShellExecuteA(, , , );//最大化打开记事本 第一个参数//系统启动第二个参数//open打开第三个参数//指令第四个参数//默认0第五个参数//默认0第六个参数//0隐藏 ...
- dll文件反编译,c#、vb动态库反编译
最近开发遇到一个项目,对方提供一个c#编写的动态库,图片处理需要调用该动态库方法,发现一张图片处理起来需要5s时间,对方无法提供有效解决手段,抱着试一试的想法反编译的对方的动态库,发现其中问题. 一下 ...
- Codeforces Round #296 (Div. 1) C. Data Center Drama 欧拉回路
Codeforces Round #296 (Div. 1)C. Data Center Drama Time Limit: 2 Sec Memory Limit: 256 MBSubmit: xx ...
- jProfiler远程连接Linux监控jvm1运行状态
第一步:下载软件官网地址:https://www.ej-technologies.com/download/jprofiler/files,下载一个linux服务端,一个windows客户端 GUI界 ...
- Redis_常见JedisConnectionException异常分析
最近项目开发中用到了Redis, 选择了官网推荐的java client Jedis.Redis常用命令学习:http://redis.io/commandsRedis官方推荐Java客户端Jedis ...
- addEventListener 的一些好方法 简单粗暴的说给你
function show(){ document.addEventListener("click",fn,{ "passive":false, "c ...
- Node.js学习笔记(1) - Node.js简介
近期在看一些Node.js的知识,看完后觉得,一些前面的东西忘记了,于是整理一下,方便自己查阅,也希望对学习Node.js的朋友有些帮助: 当然以下只是我个人的观点和理解,不喜勿喷,也望大神指教. 一 ...
- FolderSync文件夹同步
FolderSync是一款支持各大国外网盘同步的软件,目前支持 SkyDrive, Dropbox, SugarSync, Ubuntu One, Box.net, LiveDrive, HiDriv ...
- Flex4+spring+hibernate+BlazeDS整合案例
http://wenku.baidu.com/link?url=7v5xAyD2nvChQRT60QewpvAASFHMZNvD0OxX11OASYvae8jbVNsr5I000TwwYOlChzq0 ...