Git Product home page Git Product logo

angular-seed's Introduction

基于angular的前端框架

基础结构是require + angular + bootstrap

目的是让angular的前端项目可以快速启动~

##快速开始

  1. npm install
  2. grunt run-server[:port] //默认使用8080端口
  3. grunt watch //监听src/partials变化动态生成templates.js

##前端开发

  1. 增加路由(src/js/config/route.js)
  2. 增加控制器(src/js/controllers/)、服务[可选](src/js/services/)和对应的模板(src/partials)
  3. myApp中添加你的控制器
  4. 开始愉快的使用angular

##异步数据调试

  1. 在bin/api.json中增加一条后端数据,可使用mock语法
  2. 访问http://ip[:port]/~api 可看到当前项目的接口列表

##目录结构

src
  -css
  -img
  -js
    -config   全局配置
    -controllers   控制器
    -directives   指令
    -filters   过滤器
    -services   服务
    -vendor   框架、库和三方组件
    main.js   项目启动入口
    myApp.js   angular启动入口
    templates.js   动态生成的模板文件
  -partials   模板
  index.html   入口页面

@todo

  1. bower来管理各种三方库和插件
  2. api管理,接口文档生成
  3. TDD

angular-seed's People

Contributors

mmillet avatar

Stargazers

 avatar  avatar

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.