Giter VIP home page Giter VIP logo

fis3-angularjs-example's Introduction

FIS3 angular example

如何运行demo
  1. 运行如下命令, 安装node_modules, 并使用 fis3 进行编译

    npm run npm
    npm run dev
    
  2. 使用node的serve模块, 或者nginx, 或者其它能启动静态服务器的东西, 在当前目录启动静态服务器. 访问 /dist_dev/index.html

目录结构
src
├── app.js
├── boot.js
├── index.html
├── directives
│   └── myHello/
├── modules
│   ├── deps.js
│   └── fastclick/
├── plugins
│   ├── angular/
│   ├── angular-ui-router/
│   └── mod/
├── runtimes
│   ├── configs/
│   ├── directives/
│   ├── services/
│   ├── states/
│   └── runtimes.js
├── services
│   └── ServiceA.js
└── states
    ├── bar/
    └── foo/
各目录作用
  1. app.js, app 定义文件. 原则上应该只有一个app定义. 但是考虑到路由部分会经常进行添加或者删除路由, 所以没有把路由的定义放到 runtimes/configs/route.js 中, 而是直接放到了 app.js 中
  2. boot.js, 入口js, 此文件进行加载 app.js, runtimes/runtimes.js, 加载完毕后, 进行 angular 项目的初始化
  3. index.html, 入口html
  4. directives, 存放公共的directive, 以目录或者文件为单位组织.
  5. modules, 用于存放第三方库文件, 这里的文件会被 FIS3 包裹为 amd 模块. 如果需要在项目初始时就进行加载的文件, 可以选择打包在 modules/deps.js文件中
  6. plugins, 用于存放第三方库文件, 这里的文件不会被包裹为 amd 模块
  7. runtimes, 整个项目的基础模块, 比如 FastClick, configs, services等. 这些文件会全部被打包进 runtimes/runtimes.js 中, 以减少初始化时加载的文件数量
  8. services, 存放公共的services, 以目录或者文件为单位组织
  9. states, 页面存放位置, 每个页面一个目录, 目录中存放此页面需要的 css, html, js, images, 还可以存放各页面独有的 services, directive, 等等

fis3-angularjs-example's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.