/AngularJS-complete-starter

AngularJS complete base application with all good practices.

Primary LanguageJavaScriptMIT LicenseMIT

AngularJS complete starter

AngularJS complete base application with all good practices.

Demo

http://vincentperrin.com/angularjs_complete_starter/

Description

This project aims at implementing many of AngularJS basic elements with all the good practice in order to help people learn AngularJS and also to provide a project that can be a good starter.

Main features

  • Directives.
  • A factory of service.
  • Routing with UI-Router

Good practices

  • A component based structure.
  • The Immediately Invoked Function Expression (IIFE) syntax in all JavaScript files.
  • JavaScript strict mode.
  • Named function to help the debugging.
  • The use of vm (view's model) variable to catch the context of this.
  • ng-cloack to avoid the display of uncompiled elements at first display.
  • The ControllerAs syntax.
  • Dependency injection made separately for allowing non destructive minification and for improved readability.
  • A separate app.module.js fine to create the main module and inject dependencies.
  • Routes are specified in each modules.
  • A navbar directive self contained in its own folder for being fully independent and distinct.

How to use it:

Can be displaied by opening the index.html file in a browser. Because of the delivery of data using the $http method, it must be read from a server.