2 Star 0 Fork 0

tommy / baoCloud

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

baoCloud

项目构建

npm install
npm start

创建页面模块步骤:

  1. modules/ 目录下新增加页面模块目录new
  2. modules/new/ 新建index.js, 创建angular模块格式:
    angular.module('baocloud.new', []);
    require('./NewCtlr');
  3. 创建NewCtlr.js controller
    angular
        .module('baocloud.new')
        .controller('NewCtlr',NewCtlr);
    
    function NewCtlr($scope){
        //...
    }
  4. 创建模板文件new.html 和 样式表new.less
  5. 注册new模块: 文件config/app.js
    require('../modules/new');
  6. 注册模板:文件config/templates.js
    require('../modules/new/new.html');
  7. 注册样式表: 文件config/modules.less
    @import '@{modules}/new/new.less';
  8. 配置模板路由: config/routes.js
    .state('new',{
        url: '/new',
        title: 'new',
        templateUrl: 'new/new.html'
    })
  9. 重启 npm start

空文件

简介

Angular 模块化 browserify 项目示例 展开 收起
JavaScript
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/tommy2z/baoCloud.git
git@gitee.com:tommy2z/baoCloud.git
tommy2z
baoCloud
baoCloud
resize

搜索帮助