1 |
|
2 | # Report an Issue
|
3 |
|
4 | Help us make UI-Router better! If you think you might have found a bug, or some other weirdness, start by making sure
|
5 | it hasn't already been reported. You can [search through existing issues](https://github.com/angular-ui/ui-router/search?q=wat%3F&type=Issues)
|
6 | to see if someone's reported one similar to yours.
|
7 |
|
8 | If not, then [create a plunkr](http://bit.ly/UIR-Plunk) that demonstrates the problem (try to use as little code
|
9 | as possible: the more minimalist, the faster we can debug it).
|
10 |
|
11 | Next, [create a new issue](https://github.com/angular-ui/ui-router/issues/new) that briefly explains the problem,
|
12 | and provides a bit of background as to the circumstances that triggered it. Don't forget to include the link to
|
13 | that plunkr you created!
|
14 |
|
15 | **Note**: If you're unsure how a feature is used, or are encountering some unexpected behavior that you aren't sure
|
16 | is a bug, it's best to talk it out on
|
17 | [StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router) before reporting it. This
|
18 | keeps development streamlined, and helps us focus on building great software.
|
19 |
|
20 |
|
21 | Issues only! |
|
22 | -------------|
|
23 | Please keep in mind that the issue tracker is for *issues*. Please do *not* post an issue if you need help or support. Instead, see one of the above-mentioned forums or [IRC](irc://irc.freenode.net/#angularjs). |
|
24 |
|
25 | #### Purple Labels
|
26 | A purple label means that **you** need to take some further action.
|
27 | - : Your issue is not specific enough, or there is no clear action that we can take. Please clarify and refine your issue.
|
28 | - : Please [create a plunkr](http://bit.ly/UIR-Plunk)
|
29 | - : We suspect your issue is really a help request, or could be answered by the community. Please ask your question on [StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router). If you determine that is an actual issue, please explain why.
|
30 |
|
31 | If your issue gets labeled with purple label, no further action will be taken until you respond to the label appropriately.
|
32 |
|
33 | # Contribute
|
34 |
|
35 | **(1)** See the **[Developing](#developing)** section below, to get the development version of UI-Router up and running on your local machine.
|
36 |
|
37 | **(2)** Check out the [roadmap](https://github.com/angular-ui/ui-router/milestones) to see where the project is headed, and if your feature idea fits with where we're headed.
|
38 |
|
39 | **(3)** If you're not sure, [open an RFC](https://github.com/angular-ui/ui-router/issues/new?title=RFC:%20My%20idea) to get some feedback on your idea.
|
40 |
|
41 | **(4)** Finally, commit some code and open a pull request. Code & commits should abide by the following rules:
|
42 |
|
43 | - *Always* have test coverage for new features (or regression tests for bug fixes), and *never* break existing tests
|
44 | - Commits should represent one logical change each; if a feature goes through multiple iterations, squash your commits down to one
|
45 | - Make sure to follow the [Angular commit message format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) so your change will appear in the changelog of the next release.
|
46 | - Changes should always respect the coding style of the project
|
47 |
|
48 |
|
49 |
|
50 | # Developing
|
51 |
|
52 | UI-Router uses <code>npm</code> and <code>Rollup</code>.
|
53 |
|
54 | ## Fetch the source code
|
55 |
|
56 | The code for Angular UI-Router is split into two source repositories:
|
57 |
|
58 | * [UI-Router Core](https://github.com/ui-router/core) (`@uirouter/core` on npm)
|
59 | * [UI-Router for Angular 1](https://github.com/angular-ui/ui-router) (`@ui-router/angularjs` on npm)
|
60 |
|
61 | Clone both repositories into directories next to each other.
|
62 |
|
63 | ```
|
64 | mkdir uirouter
|
65 | cd uirouter
|
66 | git clone https://github.com/angular-ui/ui-router.git angularjs
|
67 | git clone https://github.com/ui-router/core.git core
|
68 | ```
|
69 |
|
70 | ## Install dependencies
|
71 |
|
72 | Use `npm` to install the development dependencies for each repository.
|
73 |
|
74 | ```
|
75 | cd core
|
76 | npm install
|
77 | cd ../angularjs
|
78 | npm install
|
79 | cd ..
|
80 | ```
|
81 |
|
82 | ## Link the directories
|
83 |
|
84 | This step is necessary if you need to modify any code in `@uirouter/core`.
|
85 | Using `npm`, link `@uirouter/core` into `@uirouter/angularjs`
|
86 |
|
87 | ```
|
88 | cd core
|
89 | npm link
|
90 | cd ../angularjs
|
91 | npm link '@uirouter/core'
|
92 | ```
|
93 |
|
94 | After executing these steps, `@uirouter/angularjs` will be depend on your local copy of `@uirouter/core` instead of the version listed in `package.json`.
|
95 |
|
96 | ## Develop
|
97 |
|
98 | These scripts may be run in the `angularjs` directory:
|
99 |
|
100 | * `npm run build`: Compiles TypeScript source
|
101 | * `npm run package`: Compiles TypeScript source and creates the Rollup bundles.
|
102 | * `npm test`: Runs the test suite (against Angular 1.2 through 1.5).
|
103 | * `npm run watch`: Continuously compiles the source and runs the test suite (when either source or tests change).
|
104 |
|
105 | Scripts of the same name (in the `core` directory) can be used.
|
106 |
|
107 | * `npm run build`: Compiles `@uirouter/core` TypeScript source
|
108 | * `npm test`: Runs the `@uirouter/core` test suite
|
109 | * `npm run watch`: Continuously compiles the source and runs the `@uirouter/core` test suite (when core source or tests change).
|
110 |
|
111 | If you've followed the [linking instructions](#link-the-directories), it's useful to run both
|
112 | `npm run watch` tasks (each task from `@uirouter/core` *and* `@uirouter/angularjs`).
|
113 | This ensures that changes to either `@uirouter/core` and `@uirouter/angularjs` compile successfully and are run against their test suites.
|