|
| 1 | +# Angular Material-Start (ES6) |
| 2 | + |
| 3 | +This branch contains the final/complete version (i.e. `step-10-finished`) of the |
| 4 | +[Material Start ES6 Tutorial](https://github.com/angular/material-start/tree/es6-tutorial) branch |
| 5 | +in this repository. |
| 6 | + |
| 7 | +There are many additional branches in this repository that you may find useful: |
| 8 | + |
| 9 | + - [`master`](https://github.com/angular/material-start/tree/master) (this branch) - A copy of the |
| 10 | + `es6` branch outlined below with additional notes about the available branches. |
| 11 | + - [`es5-tutorial`](https://github.com/angular/material-start/tree/es5-tutorial) - Step-by-step |
| 12 | + instructions that clearly demonstrate how the Starter application can be created in minutes using |
| 13 | + ES5. |
| 14 | + - [`es5`](https://github.com/angular/material-start/tree/es5) - The final ES5 version which you |
| 15 | + complete in the last step of the tutorials above. |
| 16 | + - [`es6-tutorial`](https://github.com/angular/material-start/tree/es6-tutorial) - Step-by-step |
| 17 | + instructions that clearly demonstrate how the Starter application can be created in minutes using |
| 18 | + ES6. |
| 19 | + - [`es6`](https://github.com/angular/material-start/tree/es6) - The final ES6 version which you |
| 20 | + complete in the last step of the tutorials above. |
| 21 | + - [`typescript`](https://github.com/angular/material-start/tree/typescript) - The final Starter |
| 22 | + Application built using Typescript. |
| 23 | + |
| 24 | +> **Note:** We do not currently offer a `typescript-tutorial` branch as the steps are fairly similar |
| 25 | + to the existing `es6-tutorial` branch. |
| 26 | + |
| 27 | +#### Purpose |
| 28 | + |
| 29 | +This project uses the latest master branch of Angular Material to build the application outlined |
| 30 | +below. |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +Above is a snaphot of the Starter-App with a **Master-Detail** layout: showing a list of users |
| 35 | +(left) and a user detail view (right). |
| 36 | + |
| 37 | +Also shown is the user experience that will be displayed for smaller device sizes. The responsive |
| 38 | +layout reveals the **menu** button that can be used to hide the user list. And the **share** button |
| 39 | +can be used to show the Share bottom sheet view. |
| 40 | + |
| 41 | +This Starter app demonstrates how: |
| 42 | + |
| 43 | +* Angular Material `layout` and `flex` options can easily configure HTML containers |
| 44 | +* Angular Material components `<md-toolbar>`, `<md-sidenav>`, and `<md-icon>` can quickly provide |
| 45 | + a base application structure |
| 46 | +* Custom controllers can be used and show `<md-bottomsheet>` with HTML templates |
| 47 | +* Custom controller can easily, and programmatically open/close the SideNav component |
| 48 | +* Responsive breakpoints and `$mdMedia` are used |
| 49 | +* Theming can be altered/configured using `$mdThemingProvider` |
| 50 | + |
| 51 | + |
| 52 | +This sample application is purposed as both a learning tool and a skeleton application for a typical |
| 53 | +[AngularJS Material](http://angularjs.org/) web app, comprised of a side navigation area and a |
| 54 | +content area. You can use it to quickly bootstrap your angular webapp projects and dev environment |
| 55 | +for these projects. |
| 56 | + |
| 57 | +- - - |
| 58 | + |
| 59 | +#### "How to build an App" |
| 60 | + |
| 61 | +Here are some generalized steps that may be used to conceptualize the application implementation |
| 62 | +process: |
| 63 | + |
| 64 | +1. Plan your layout and the components you want to use |
| 65 | + |
| 66 | +2. Use hard-coded HTML and mock content to make sure the components appear as desired |
| 67 | + |
| 68 | +3. Wire components to your application logic |
| 69 | + |
| 70 | + > Use the seamless integration possible with Angular directives and controllers.<br/> |
| 71 | + > This integration assumes that you have unit tested your application logic. |
| 72 | +
|
| 73 | +4. Add Responsive breakpoints |
| 74 | + |
| 75 | +5. Add Theming support |
| 76 | + |
| 77 | +6. Confirm ARIA compliance |
| 78 | + |
| 79 | +7. Write End-to-end (e2e) Tests |
| 80 | + |
| 81 | + > It is important to validate your application logic with Angular Material UI components. |
| 82 | +
|
| 83 | +###### Wirefame |
| 84 | + |
| 85 | +The illustration below shows how we planned the layout and identified the primary components that |
| 86 | +will be used in the Starter app: |
| 87 | + |
| 88 | +<br/> |
| 89 | + |
| 90 | + |
| 91 | +> **Note:** The container #2 (above) is a simple `<div>` container and not an Angular Material |
| 92 | + component. |
| 93 | + |
| 94 | +- - - |
| 95 | + |
| 96 | +##### Getting Started |
| 97 | + |
| 98 | +This project uses [jspm.io](http://jspm.io), a package manager for SystemJS which is built on top |
| 99 | +of the dynamic ES6 module loader. This allows developers to load any module format (ES6, CommonJS, |
| 100 | +AMD, and globals). |
| 101 | + |
| 102 | +###### Prerequisites |
| 103 | + |
| 104 | +This project assumes that you have NodeJS and any relevant development tools (like XCode) already |
| 105 | +installed. |
| 106 | + |
| 107 | +###### Getting Started |
| 108 | + |
| 109 | +Clone this repository and execute the following commands in a terminal: |
| 110 | + |
| 111 | +* `git checkout es6` |
| 112 | +* `npm install jspm live-server -g` |
| 113 | +* `jspm update` |
| 114 | +* `live-server --open=app` |
| 115 | + |
| 116 | +> **Note:** You should use a web-server (like live-server above) to view your app in the browser. Open |
| 117 | + the dev console to see any warnings and browse the elements. |
| 118 | + |
| 119 | +###### Layout |
| 120 | + |
| 121 | +You will notice a few files/directories within this project: |
| 122 | + |
| 123 | + 1. `app/src` - This is where all of your application files are stored. |
| 124 | + 2. `app/assets` - This folder contains some tutorial-provided images and icons which are used by |
| 125 | + the application. |
| 126 | + 3. `index.html` - The entry point to your application. This uses System.js to load the |
| 127 | + `app/src/boot/boot.js` bootstrap file which in turn loads the `app/src/app.js` file that imports |
| 128 | + all of your dependencies and declares them as Angular modules, and configures the icons and |
| 129 | + theming for the application. |
| 130 | + |
| 131 | +#### Troubleshooting |
| 132 | + |
| 133 | +If you have issues getting the application to run or work as expected: |
| 134 | + |
| 135 | +1. Make sure you have installed JSPM and run the `jspm update` command. |
| 136 | +2. Reach out on our [Forum](https://groups.google.com/forum/#!forum/ngmaterial) to see if any other |
| 137 | + developers have had the same issue. |
| 138 | +3. This project is based against the `master` branch of Angular Material, so it is always showing |
| 139 | + the latest and greatest. You may want to update the `package.json` to use Version 1.1.0 or |
| 140 | + another stable release to make sure it isn't because of something we changed recently. |
| 141 | +4. Search for the issue here on [GitHub](https://github.com/angular/material-start/issues?q=is%3Aissue+is%3Aopen). |
| 142 | +5. If you don't see an existing issue, please open a new one with the relevant information and the |
| 143 | + details of the problem you are facing. |
0 commit comments