GithubHelp home page GithubHelp logo

angular-webapp-starter's Introduction

angular-web-project

Boilerplate angular project with

  • gulp
  • lodash
  • angular-ui-router
  • restangular
  • angular-http-auth
  • angular-permission
  • [satellizer]

Routing

We use ui-router for routing.

Consuming REST

This feature is based on Restangular. #####TODO: write some boilerplate/examples for configuring rest services based on Restangular

Autentication

angular-http-auth is used for adding an http interceptor handling 401 and 403 errors, as well as mechanism to retry failed calls after login (#todo: link docs)

Authentication flow

[IN PROGRESS]

Options:

  • hello.js (client auth only, with support to many services and abstraction on common methods)
  • satellizer (oauth/oauth2 support)
  • ng-token-auth (similar to satellizer, with support for many events)

(For apache-cordova see: ng-cordova-oauth)

Use cases

  • social only.

Integration examples

?? how to handle them ? "plugins" ?

Authorization (for local routes)

Authorization is based on angular-permissions, which integrates nicely with ui-router, providing the concept of "permission", redirection, and events.

Config in src/config/permissions-config.js

Combining permissions with REST: common patterns

IN PROGRESS

Minification

Using gulp for building a "dist" folder with:

  • minified css
  • minified js (your source)
  • js inline templates

You should write code only in the "src" folder! ** any changes made in "dist" will be overwritten by gulp. **

Inline templates

Every .html file you put under "src/templates" folder and subfolders will be inlined in the htmlTemplates global variable.

htmlTemplates['relative/path/to/file.html']

angular-webapp-starter's People

Contributors

bianchimro 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.