transmart/transmart-base-ui

Name: transmart-base-ui

Owner: TranSMART Project

Description: Boilerplate code for tranSMART UI

Created: 2015-01-23 15:49:33.0

Updated: 2016-07-08 11:35:52.0

Pushed: 2016-11-25 11:32:12.0

Homepage: null

Size: 827

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

transmart-base-ui

Boilerplate code for tranSMART UI

Demo

http://transmart-gb.thehyve.net

Pre-requisites

Make sure you have npm installed https://docs.npmjs.com/getting-started/installing-node

Usage

Run following from the project root

Use More Gulp tasks

More information on the gulp tasks in this README.md.

Configuration for development, testing and production

There are different configurations available for development, testing and production: 'dev', 'test' and 'prod'. Specify your environment by passing a parameter to gulp ('dev' is the default):

Directory structure

Best Practice Recommendations for Angular App Structure

The root directory generated for a app with name gulpAngular :

???  src/
?   ???  app/
?   ?   ???  main/
?   ?   ?   ???  main.controller.js
?   ?   ?   ???  main.controller.spec.js
?   ?   ?   ???  main.html
?   ?   ???  index.js
?   ?   ???  index.(css|less|scss)
?   ?   ???  vendor.(css|less|scss)
?   ???  assets/
?   ?   ???  images/
?   ???  components/
?   ?   ???  navbar/
?   ?   ?   ???  navbar.controller.js
?   ?   ?   ???  navbar.html
?   ???  404.html
?   ???  favico.ico
?   ???  index.html
???  gulp/
???  e2e/
???  bower_components/
???  nodes_modules/
???  .bowerrc
???  .editorconfig
???  .gitignore
???  .jshintrc
???  bower.json
???  gulpfile.js
???  karma.conf.js
???  package.json
???  protractor.conf.js
Features included in the gulpfile
Server Config

Angular html5mode is enabled to remove hashtag in the typical AngularJS application. For that reason server side rewrites is needed. Following is Apache Rewrites:

tualHost *:80>
ServerName my-app

DocumentRoot /path/to/app

<Directory /path/to/app>
    RewriteEngine on

    # Don't rewrite files or directories
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    # Rewrite everything else to index.html to allow html5 state links
    RewriteRule ^ index.html [L]
</Directory>
rtualHost>

If you deploy it to another application server find the configuration here:

https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions#how-to-configure-your-server-to-work-with-html5mode


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.