├── .bowerrc ├── .gitignore ├── .jshintrc ├── .travis.yml ├── LICENSE ├── README.md ├── app ├── assets │ ├── app.css │ └── svg │ │ ├── Log-in.svg │ │ ├── dollar.svg │ │ └── menu.svg ├── index.html └── src │ └── tabs │ ├── Tabs.js │ ├── TabsController.js │ ├── TabsService.js │ ├── financial │ ├── financial.html │ └── financial.js │ └── login │ ├── login.html │ └── login.js ├── bower.json └── package.json /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "app/bower_components" 3 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | logs/* 2 | !.gitkeep 3 | node_modules/ 4 | bower_components/ 5 | tmp 6 | .DS_Store 7 | .idea 8 | app/jspm_packages 9 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "globalstrict": true, 3 | "globals": { 4 | "angular": false, 5 | "describe": false, 6 | "it": false, 7 | "expect": false, 8 | "beforeEach": false, 9 | "afterEach": false, 10 | "module": false, 11 | "inject": false 12 | } 13 | } -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | 5 | before_script: 6 | - export DISPLAY=:99.0 7 | - sh -e /etc/init.d/xvfb start 8 | - npm start > /dev/null & 9 | - npm run update-webdriver 10 | - sleep 1 # give server time to start 11 | 12 | script: 13 | - node_modules/.bin/karma start karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox 14 | - node_modules/.bin/protractor e2e-tests/protractor.conf.js --browser=firefox 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2010-2014 Google, Inc. http://angularjs.org 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Angular Material with Routing - a Demo 2 | 3 | This project contains a sample AngularJS application and is preconfigured to install the Angular Material framework 4 | and a bunch of dependenciesfor instant web development gratification. The seed code for the project was provided by 5 | the Angular Material starter project 6 | [https://github.com/angular/material-start](https://github.com/angular/material-start). That includes this very 7 | README.md file 8 | 9 | This sample application is intended to be a shell to demonstrate a starter Angular Material project and how it can be 10 | used with ngRoute to create a modular project with html fragments which can be brought together using ngRoute but 11 | without exposing *ugly* URL links, but instead expose a side navigation bar (side nav). The contents of the side nav 12 | link to the different html fragments which are *"loaded"* into the main content area. I must emphasize *shell* because 13 | in particular, I leave out any code for authentication or form submission. The methods called when you click some of the 14 | buttons is nothing but a stub. 15 | 16 | It also demonstrates the use angular-material's ```md-tabs```, ```md-input```, ```md-select``` and ```md-button``` 17 | 18 | ## Getting Started 19 | 20 | #### Prerequisites 21 | 22 | You will need **git** to clone this repository. You can get git from 23 | [http://git-scm.com/](http://git-scm.com/). 24 | 25 | We also use a number of **node.js** tools to initialize and test this project. You must have node.js and 26 | its package manager **npm** installed. You can get them from [http://nodejs.org/](http://nodejs.org/). 27 | 28 | After you get node.js and npm, be sure to install **bower**. You can install bower as such 29 | 30 | ``` 31 | npm install bower 32 | ``` 33 | 34 | #### Install the dependencies 35 | 36 | Go to the root of this project and execute ```bower install bower.json``` which will install a number of files in 37 | `app/bower_components` 38 | 39 | *Note that the `bower_components` folder would normally be installed in the root folder but 40 | the `.bowerrc` file alters the directory to be `app/bower_components`. Putting it in the app folder makes 41 | it easier to serve the files by a webserver.* 42 | 43 | ## Directory Layout 44 | 45 | 46 | app/ --> all of the source files for the application 47 | assets/app.css --> default stylesheet 48 | src/ --> all app specific modules 49 | users/ --> package for user features 50 | index.html --> app layout file (the main html template file of the app) 51 | karma.conf.js --> config file for running unit tests with Karma 52 | e2e-tests/ --> end-to-end tests 53 | protractor-conf.js --> Protractor config file 54 | scenarios.js --> end-to-end scenarios to be run by Protractor 55 | 56 | 57 | ## Updating Angular 58 | 59 | You can update the tool dependencies by running: 60 | 61 | ``` 62 | npm update 63 | ``` 64 | 65 | This will find the latest versions that match the version ranges specified in the `package.json` file. 66 | 67 | You can update the Angular dependencies by running: 68 | 69 | ``` 70 | bower update 71 | ``` 72 | 73 | This will find the latest versions that match the version ranges specified in the `bower.json` file. 74 | 75 | 76 | ## Serving the Application Files 77 | 78 | While angular is client-side-only technology and it's possible to create angular webapps that 79 | don't require a backend server at all, we recommend serving the project files using a local 80 | webserver during development to avoid issues with security restrictions (sandbox) in browsers. The 81 | sandbox implementation varies between browsers, but quite often prevents things like cookies, xhr, 82 | etc to function properly when an html page is opened via `file://` scheme instead of `http://`. 83 | 84 | ### Running the App during Development 85 | 86 | The angular-seed project comes preconfigured with a local development webserver. It is a node.js 87 | tool called [http-server][http-server]. You can install http-server globally: 88 | 89 | ``` 90 | sudo npm install -g http-server 91 | ``` 92 | 93 | Then you can start your own development web server to serve static files from a folder by running: 94 | 95 | ``` 96 | cd app 97 | http-server -a localhost -p 8000 98 | ``` 99 | 100 | Alternatively, you can choose to configure your own webserver, such as apache or nginx. Just 101 | configure your server to serve the files under the `app/` directory. 102 | 103 | 104 | ## Contact 105 | 106 | For more information on AngularJS please check out http://angularjs.org/ 107 | For more information on Angular Material, check out https://material.angularjs.org/ 108 | 109 | [git]: http://git-scm.com/ 110 | [bower]: http://bower.io 111 | [npm]: https://www.npmjs.org/ 112 | [node]: http://nodejs.org 113 | [http-server]: https://github.com/nodeapps/http-server 114 | -------------------------------------------------------------------------------- /app/assets/app.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | font-family: 'Roboto', sans-serif; 3 | font-size: 14px; 4 | height: 100%; 5 | margin: 0px; 6 | padding: 0px; 7 | } 8 | 9 | /* Toolbar area */ 10 | 11 | .menu { 12 | background-color: transparent; 13 | border: none; 14 | height: 38px; 15 | margin: 16px; 16 | width: 36px; 17 | } 18 | 19 | md-toolbar h1 { 20 | margin: auto; 21 | } 22 | 23 | /* Sidenav area */ 24 | 25 | md-list .md-button { 26 | color: inherit; 27 | font-weight: 500; 28 | text-align: left; 29 | width: 100%; 30 | } 31 | 32 | md-list .md-button.selected { 33 | color: #03a9f4; 34 | } 35 | 36 | md-sidenav md-list { 37 | padding: 0px 0px 8px 0px; 38 | } 39 | 40 | /* Primary content area */ 41 | 42 | #content { 43 | overflow: hidden; 44 | } 45 | 46 | #content { 47 | padding-left: 40px; 48 | padding-right: 40px; 49 | padding-top: 5px; 50 | } 51 | 52 | #content .md-button.share { 53 | background-color: transparent; 54 | border: none; 55 | width: 48px; 56 | height: 48px; 57 | margin: 8px auto 16px 0; 58 | position: absolute; 59 | top: 10px; 60 | right: 25px; 61 | } 62 | 63 | #content md-icon.avatar { 64 | margin-top: 10px; 65 | } 66 | 67 | #content .md-button.share > md-icon { 68 | fill: black; 69 | width: 36px; 70 | height: 36px; 71 | } 72 | 73 | md-button.menuBtn > md-icon { 74 | fill: white; 75 | width: 24px; 76 | height: 24px; 77 | } 78 | 79 | #content .md-button.share:active > md-icon { 80 | background-color: #dadada; 81 | border-radius: 75%; 82 | padding: 4px; 83 | transition: all 100ms ease-out 30ms; 84 | } 85 | 86 | #content img { 87 | display: block; 88 | height: auto; 89 | max-width: 500px; 90 | } 91 | 92 | /* Utils */ 93 | 94 | .content-wrapper { 95 | position: relative; 96 | } 97 | 98 | /* Typography support coming in 0.8.0 */ 99 | 100 | md-toolbar h1 { 101 | font-size: 1.250em; 102 | font-weight: 400; 103 | } 104 | 105 | .avatar { 106 | position: relative; 107 | width: 128px; 108 | height: 128px; 109 | border: 1px solid #ddd; 110 | border-radius: 50%; 111 | display: inline-block; 112 | overflow: hidden; 113 | margin: 0px; 114 | vertical-align: middle; 115 | zoom: 0.70; 116 | transform: translateZ(0); 117 | -webkit-transform: scale(0.70); 118 | -moz-transform: scale(0.70); 119 | } 120 | 121 | md-bottom-sheet md-icon { 122 | margin-right: 20px; 123 | } 124 | 125 | span.name { 126 | font-weight: bold; 127 | font-size: 1.1em; 128 | padding-left: 5px; 129 | } 130 | -------------------------------------------------------------------------------- /app/assets/svg/dollar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/svg/menu.svg: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |{{tab.name_provider()}}
39 |