il y a 1 an 16793 058f31828c first commit il y a 1 an 16795 058f31828c first commit il y a 1 an 16797 058f31828c first commit il y a 1 an 16800 058f31828c first commit il y a 1 an 16802 058f31828c first commit il y a 1 an 16803 058f31828c first commit il y a 1 an 16805 058f31828c first commit il y a 1 an 16807 058f31828c first commit il y a 1 an 16810 058f31828c first commit il y a 1 an 16812 058f31828c first commit il y a 1 an 16814 058f31828c first commit il y a 1 an 16817 058f31828c first commit il y a 1 an 16819 058f31828c first commit il y a 1 an 16821 058f31828c first commit il y a 1 an 16824 058f31828c first commit il y a 1 an 16831 058f31828c first commit il y a 1 an 16832 058f31828c first commit il y a 1 an 16843 058f31828c first commit il y a 1 an 16844 058f31828c first commit il y a 1 an 16850 058f31828c first commit il y a 1 an 16856 058f31828c first commit il y a 1 an 16862 058f31828c first commit il y a 1 an 16868 058f31828c first commit il y a 1 an 16869 058f31828c first commit il y a 1 an 16871 058f31828c first commit il y a 1 an 16874 058f31828c first commit il y a 1 an 16876 058f31828c first commit il y a 1 an 16877 058f31828c first commit il y a 1 an 16879 058f31828c first commit il y a 1 an 16887 058f31828c first commit il y a 1 an 16889 058f31828c first commit il y a 1 an 16892 058f31828c first commit il y a 1 an 16896 058f31828c first commit il y a 1 an 16898 058f31828c first commit il y a 1 an 16901 058f31828c first commit il y a 1 an 16903 058f31828c first commit il y a 1 an 16911 058f31828c first commit il y a 1 an 16917 058f31828c first commit il y a 1 an 16918 058f31828c first commit il y a 1 an 16922 058f31828c first commit il y a 1 an 16924 058f31828c first commit il y a 1 an 16926 058f31828c first commit il y a 1 an 16927 058f31828c first commit il y a 1 an 16928 058f31828c first commit il y a 1 an 16929 058f31828c first commit il y a 1 an 16932 058f31828c first commit il y a 1 an 16934 058f31828c first commit il y a 1 an 16941 058f31828c first commit il y a 1 an 16942 058f31828c first commit il y a 1 an 16944 058f31828c first commit il y a 1 an 16947 058f31828c first commit il y a 1 an 16949 058f31828c first commit il y a 1 an 16951 058f31828c first commit il y a 1 an 16952 058f31828c first commit il y a 1 an 16962 058f31828c first commit il y a 1 an 16964 058f31828c first commit il y a 1 an 16967 058f31828c first commit il y a 1 an 16969 058f31828c first commit il y a 1 an 16971 058f31828c first commit il y a 1 an 16974 058f31828c first commit il y a 1 an 16976 058f31828c first commit il y a 1 an 16978 058f31828c first commit il y a 1 an 16981 058f31828c first commit il y a 1 an 16983 058f31828c first commit il y a 1 an 16984 058f31828c first commit il y a 1 an 16986 058f31828c first commit il y a 1 an 16996 058f31828c first commit il y a 1 an 17008 058f31828c first commit il y a 1 an 17009 058f31828c first commit il y a 1 an 17020 058f31828c first commit il y a 1 an 17021 058f31828c first commit il y a 1 an 17022 058f31828c first commit il y a 1 an 17024 058f31828c first commit il y a 1 an 17034 058f31828c first commit il y a 1 an 17037 058f31828c first commit il y a 1 an 17039 058f31828c first commit il y a 1 an 17040 058f31828c first commit il y a 1 an 17041 058f31828c first commit il y a 1 an 17042 058f31828c first commit il y a 1 an 174 058f31828c first commit il y a 1 an 175 058f31828c first commit il y a 1 an 2187 058f31828c first commit il y a 1 an 2224 058f31828c first commit il y a 1 an 2328 058f31828c first commit il y a 1 an 2336 058f31828c first commit il y a 1 an 2337 058f31828c first commit il y a 1 an 2579 058f31828c first commit il y a 1 an 2600 058f31828c first commit il y a 1 an 2600_fsm 058f31828c first commit il y a 1 an 2600_vm 058f31828c first commit il y a 1 an 2601 058f31828c first commit il y a 1 an 2601_fsm 058f31828c first commit il y a 1 an 2601_vm 058f31828c first commit il y a 1 an 2602 058f31828c first commit il y a 1 an 2602_fsm 058f31828c first commit il y a 1 an 2602_vm 058f31828c first commit il y a 1 an 2603 058f31828c first commit il y a 1 an 2603_fsm 058f31828c first commit il y a 1 an 2603_vm 058f31828c first commit il y a 1 an 2604 058f31828c first commit il y a 1 an 2605 058f31828c first commit il y a 1 an 2605_fsm 058f31828c first commit il y a 1 an 2605_vm 058f31828c first commit il y a 1 an 2606 058f31828c first commit il y a 1 an 2606_fsm 058f31828c first commit il y a 1 an 2606_vm 058f31828c first commit il y a 1 an 2607 058f31828c first commit il y a 1 an 2607_fsm 058f31828c first commit il y a 1 an 2607_vm 058f31828c first commit il y a 1 an 2608 058f31828c first commit il y a 1 an 2608_fsm 058f31828c first commit il y a 1 an 2608_vm 058f31828c first commit il y a 1 an 2609 058f31828c first commit il y a 1 an 2609_fsm 058f31828c first commit il y a 1 an 2609_vm 058f31828c first commit il y a 1 an 2610 058f31828c first commit il y a 1 an 2610_fsm 058f31828c first commit il y a 1 an 2610_vm 058f31828c first commit il y a 1 an 2611 058f31828c first commit il y a 1 an 2612 058f31828c first commit il y a 1 an 2612_fsm 058f31828c first commit il y a 1 an 2612_vm 058f31828c first commit il y a 1 an 2613 058f31828c first commit il y a 1 an 2615 058f31828c first commit il y a 1 an 2615_fsm 058f31828c first commit il y a 1 an 2615_vm 058f31828c first commit il y a 1 an 2616 058f31828c first commit il y a 1 an 2616_fsm 058f31828c first commit il y a 1 an 2616_vm 058f31828c first commit il y a 1 an 2617 058f31828c first commit il y a 1 an 2617_fsm 058f31828c first commit il y a 1 an 2617_vm 058f31828c first commit il y a 1 an 2618 058f31828c first commit il y a 1 an 2618_fsm 058f31828c first commit il y a 1 an 2618_vm 058f31828c first commit il y a 1 an 2619 058f31828c first commit il y a 1 an 2619_fsm 058f31828c first commit il y a 1 an 2619_vm 058f31828c first commit il y a 1 an 2620 058f31828c first commit il y a 1 an 2620_fsm 058f31828c first commit il y a 1 an 2650 058f31828c first commit il y a 1 an 2651 058f31828c first commit il y a 1 an 2652 058f31828c first commit il y a 1 an 2653 058f31828c first commit il y a 1 an 2654 058f31828c first commit il y a 1 an 2655 058f31828c first commit il y a 1 an 2656 058f31828c first commit il y a 1 an 2657 058f31828c first commit il y a 1 an 2658 058f31828c first commit il y a 1 an 2659 058f31828c first commit il y a 1 an 2660 058f31828c first commit il y a 1 an 2661 058f31828c first commit il y a 1 an 2662 058f31828c first commit il y a 1 an 2663 058f31828c first commit il y a 1 an 2664 058f31828c first commit il y a 1 an 2665 058f31828c first commit il y a 1 an 2666 058f31828c first commit il y a 1 an 2667 058f31828c first commit il y a 1 an 2668 058f31828c first commit il y a 1 an 2669 058f31828c first commit il y a 1 an 2670 058f31828c first commit il y a 1 an 2673 058f31828c first commit il y a 1 an 2674 058f31828c first commit il y a 1 an 2675 058f31828c first commit il y a 1 an 2678 058f31828c first commit il y a 1 an 2679 058f31828c first commit il y a 1 an 2680 058f31828c first commit il y a 1 an 2681 058f31828c first commit il y a 1 an 2682 058f31828c first commit il y a 1 an 2683 058f31828c first commit il y a 1 an 2684 058f31828c first commit il y a 1 an 2685 058f31828c first commit il y a 1 an 2686 058f31828c first commit il y a 1 an 2687 058f31828c first commit il y a 1 an 2688 058f31828c first commit il y a 1 an 2689 058f31828c first commit il y a 1 an 2690 058f31828c first commit il y a 1 an 2691 058f31828c first commit il y a 1 an 2692 058f31828c first commit il y a 1 an 2693 058f31828c first commit il y a 1 an 2696 058f31828c first commit il y a 1 an 2699 058f31828c first commit il y a 1 an 2701 058f31828c first commit il y a 1 an 2702 058f31828c first commit il y a 1 an 2703 058f31828c first commit il y a 1 an 2704 058f31828c first commit il y a 1 an 2753 058f31828c first commit il y a 1 an 2753_fsm 058f31828c first commit il y a 1 an 2753_vm 058f31828c first commit il y a 1 an 2754 058f31828c first commit il y a 1 an 2755 058f31828c first commit il y a 1 an 2756 058f31828c first commit il y a 1 an 2757 058f31828c first commit il y a 1 an 2830 058f31828c first commit il y a 1 an 2831 058f31828c first commit il y a 1 an 2832 058f31828c first commit il y a 1 an 2833 058f31828c first commit il y a 1 an 2834 058f31828c first commit il y a 1 an 2835 058f31828c first commit il y a 1 an 2836 058f31828c first commit il y a 1 an 2837 058f31828c first commit il y a 1 an 2838 058f31828c first commit il y a 1 an 2838_fsm 058f31828c first commit il y a 1 an 2838_vm 058f31828c first commit il y a 1 an 2839 058f31828c first commit il y a 1 an 2840 058f31828c first commit il y a 1 an 2840_fsm 058f31828c first commit il y a 1 an 2840_vm 058f31828c first commit il y a 1 an 2841 058f31828c first commit il y a 1 an 2995 058f31828c first commit il y a 1 an 2996 058f31828c first commit il y a 1 an 3079 058f31828c first commit il y a 1 an 3079_fsm 058f31828c first commit il y a 1 an 3079_vm 058f31828c first commit il y a 1 an 3080 058f31828c first commit il y a 1 an 3081 058f31828c first commit il y a 1 an 3085 058f31828c first commit il y a 1 an 3118 058f31828c first commit il y a 1 an 3119 058f31828c first commit il y a 1 an 3164 058f31828c first commit il y a 1 an 3256 058f31828c first commit il y a 1 an 3257 058f31828c first commit il y a 1 an 3258 058f31828c first commit il y a 1 an 3350 058f31828c first commit il y a 1 an 3351 058f31828c first commit il y a 1 an 3379 058f31828c first commit il y a 1 an 3380 058f31828c first commit il y a 1 an 3381 058f31828c first commit il y a 1 an 3394 058f31828c first commit il y a 1 an 3394_fsm 058f31828c first commit il y a 1 an 3394_vm 058f31828c first commit il y a 1 an 3395 058f31828c first commit il y a 1 an 3429 058f31828c first commit il y a 1 an 3430 058f31828c first commit il y a 1 an 3431 058f31828c first commit il y a 1 an 3433 058f31828c first commit il y a 1 an 3439 058f31828c first commit il y a 1 an 3440 058f31828c first commit il y a 1 an 3455 058f31828c first commit il y a 1 an 3456 058f31828c first commit il y a 1 an 3456_fsm 058f31828c first commit il y a 1 an 3456_vm 058f31828c first commit il y a 1 an 3466 058f31828c first commit il y a 1 an 3467 058f31828c first commit il y a 1 an 3468 058f31828c first commit il y a 1 an 3501 058f31828c first commit il y a 1 an 3502 058f31828c first commit il y a 1 an 3503 058f31828c first commit il y a 1 an 3534 058f31828c first commit il y a 1 an 3541 058f31828c first commit il y a 1 an 3541_fsm 058f31828c first commit il y a 1 an 3541_vm 058f31828c first commit il y a 1 an 3542 058f31828c first commit il y a 1 an 3574 058f31828c first commit il y a 1 an 3575 058f31828c first commit il y a 1 an 3576 058f31828c first commit il y a 1 an 3596 058f31828c first commit il y a 1 an 3597 058f31828c first commit il y a 1 an 3598 058f31828c first commit il y a 1 an 3599 058f31828c first commit il y a 1 an 3600 058f31828c first commit il y a 1 an 3600_fsm 058f31828c first commit il y a 1 an 3600_vm 058f31828c first commit il y a 1 an 3601 058f31828c first commit il y a 1 an 3601_fsm 058f31828c first commit il y a 1 an 3601_vm 058f31828c first commit il y a 1 an 3602 058f31828c first commit il y a 1 an 3602_fsm 058f31828c first commit il y a 1 an 3602_vm 058f31828c first commit il y a 1 an 3603 058f31828c first commit il y a 1 an 3603_fsm 058f31828c first commit il y a 1 an 3603_vm 058f31828c first commit il y a 1 an 3604 058f31828c first commit il y a 1 an 3605 058f31828c first commit il y a 1 an 3606 058f31828c first commit il y a 1 an 3607 058f31828c first commit il y a 1 an 3608 058f31828c first commit il y a 1 an 3609 058f31828c first commit il y a 1 an 3712 058f31828c first commit il y a 1 an 3764 058f31828c first commit il y a 1 an 3764_fsm 058f31828c first commit il y a 1 an 3764_vm 058f31828c first commit il y a 1 an 3766 058f31828c first commit il y a 1 an 3767 058f31828c first commit il y a 1 an 3997 058f31828c first commit il y a 1 an 4143 058f31828c first commit il y a 1 an 4144 058f31828c first commit il y a 1 an 4145 058f31828c first commit il y a 1 an 4146 058f31828c first commit il y a 1 an 4147 058f31828c first commit il y a 1 an 4148 058f31828c first commit il y a 1 an 4149 058f31828c first commit il y a 1 an 4150 058f31828c first commit il y a 1 an 4151 058f31828c first commit il y a 1 an 4152 058f31828c first commit il y a 1 an 4153 058f31828c first commit il y a 1 an 4154 058f31828c first commit il y a 1 an 4155 058f31828c first commit il y a 1 an 4156 058f31828c first commit il y a 1 an 4157 058f31828c first commit il y a 1 an 4158 058f31828c first commit il y a 1 an 4159 058f31828c first commit il y a 1 an 4160 058f31828c first commit il y a 1 an 4161 058f31828c first commit il y a 1 an 4162 058f31828c first commit il y a 1 an 4163 058f31828c first commit il y a 1 an 4164 058f31828c first commit il y a 1 an 4165 058f31828c first commit il y a 1 an 4166 058f31828c first commit il y a 1 an 4167 058f31828c first commit il y a 1 an 4168 058f31828c first commit il y a 1 an 4169 058f31828c first commit il y a 1 an 4170 058f31828c first commit il y a 1 an 4171 058f31828c first commit il y a 1 an 4172 058f31828c first commit il y a 1 an 4173 058f31828c first commit il y a 1 an 4174 058f31828c first commit il y a 1 an 5002 058f31828c first commit il y a 1 an 548 058f31828c first commit il y a 1 an 549 058f31828c first commit il y a 1 an 6102 058f31828c first commit il y a 1 an 6104 058f31828c first commit il y a 1 an 6106 058f31828c first commit il y a 1 an 6110 058f31828c first commit il y a 1 an 6111 058f31828c first commit il y a 1 an 6112 058f31828c first commit il y a 1 an 6113 058f31828c first commit il y a 1 an 6117 058f31828c first commit il y a 1 an 826 058f31828c first commit il y a 1 an 827 058f31828c first commit il y a 1 an 828 058f31828c first commit il y a 1 an PG_VERSION 058f31828c first commit il y a 1 an pg_filenode.map 058f31828c first commit il y a 1 an pg_internal.init 058f31828c first commit il y a 1 an louise/louise-tna - Gogs: Simplico Git Service

Nav apraksta

Thiranon Wiriyanurakkul 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
..
api 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
release 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
src 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
.bower.json 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
CHANGELOG.md 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
CONTRIBUTING.md 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
LICENSE 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
README.md 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
bower.json 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ

README.md

AngularUI Router  Build Status

The de-facto solution to flexible routing with nested views


Download 0.2.11 (or Minified) | Guide | API | Sample (Src) | FAQ | Resources | Report an Issue | Contribute | Help! | Discuss


AngularUI Router is a routing framework for AngularJS, which allows you to organize the parts of your interface into a state machine. Unlike the $route service in the Angular ngRoute module, which is organized around URL routes, UI-Router is organized around states, which may optionally have routes, as well as other behavior, attached.

States are bound to named, nested and parallel views, allowing you to powerfully manage your application's interface.

Check out the sample app: http://angular-ui.github.io/ui-router/sample/

- Note: UI-Router is under active development. As such, while this library is well-tested, the API may change. Consider using it in production applications only if you're comfortable following a changelog and updating your usage accordingly.

Get Started

(1) Get UI-Router in one of the following ways:

  • clone & build this repository
  • download the release (or minified)
  • via Bower: by running $ bower install angular-ui-router from your console
  • or via npm: by running $ npm install angular-ui-router from your console
  • or via Component: by running $ component install angular-ui/ui-router from your console

(2) Include angular-ui-router.js (or angular-ui-router.min.js) in your index.html, after including Angular itself (For Component users: ignore this step)

(3) Add 'ui.router' to your main module's list of dependencies (For Component users: replace 'ui.router' with require('angular-ui-router'))

When you're done, your setup should look similar to the following:

<!doctype html>
<html ng-app="myApp">
<head>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>
    <script src="js/angular-ui-router.min.js"></script>
    <script>
        var myApp = angular.module('myApp', ['ui.router']);
        // For Component users, it should look like this:
        // var myApp = angular.module('myApp', [require('angular-ui-router')]);
    </script>
    ...
</head>
<body>
    ...
</body>
</html>

Nested States & Views

The majority of UI-Router's power is in its ability to nest states & views.

(1) First, follow the setup instructions detailed above.

(2) Then, add a ui-view directive to the <body /> of your app.

<!-- index.html -->
<body>
    <div ui-view></div>
    <!-- We'll also add some navigation: -->
    <a ui-sref="state1">State 1</a>
    <a ui-sref="state2">State 2</a>
</body>

(3) You'll notice we also added some links with ui-sref directives. In addition to managing state transitions, this directive auto-generates the href attribute of the <a /> element it's attached to, if the corresponding state has a URL. Next we'll add some templates. These will plug into the ui-view within index.html. Notice that they have their own ui-view as well! That is the key to nesting states and views.

<!-- partials/state1.html -->
<h1>State 1</h1>
<hr/>
<a ui-sref="state1.list">Show List</a>
<div ui-view></div>
<!-- partials/state2.html -->
<h1>State 2</h1>
<hr/>
<a ui-sref="state2.list">Show List</a>
<div ui-view></div>

(4) Next, we'll add some child templates. These will get plugged into the ui-view of their parent state templates.

<!-- partials/state1.list.html -->
<h3>List of State 1 Items</h3>
<ul>
  <li ng-repeat="item in items">{{ item }}</li>
</ul>
<!-- partials/state2.list.html -->
<h3>List of State 2 Things</h3>
<ul>
  <li ng-repeat="thing in things">{{ thing }}</li>
</ul>

(5) Finally, we'll wire it all up with $stateProvider. Set up your states in the module config, as in the following:

myApp.config(function($stateProvider, $urlRouterProvider) {
  //
  // For any unmatched url, redirect to /state1
  $urlRouterProvider.otherwise("/state1");
  //
  // Now set up the states
  $stateProvider
    .state('state1', {
      url: "/state1",
      templateUrl: "partials/state1.html"
    })
    .state('state1.list', {
      url: "/list",
      templateUrl: "partials/state1.list.html",
      controller: function($scope) {
        $scope.items = ["A", "List", "Of", "Items"];
      }
    })
    .state('state2', {
      url: "/state2",
      templateUrl: "partials/state2.html"
    })
    .state('state2.list', {
      url: "/list",
      templateUrl: "partials/state2.list.html",
      controller: function($scope) {
        $scope.things = ["A", "Set", "Of", "Things"];
      }
    });
});

(6) See this quick start example in action.

Go to Quick Start Plunker for Nested States & Views

(7) This only scratches the surface

Dive Deeper!

Multiple & Named Views

Another great feature is the ability to have multiple ui-views view per template.

Pro Tip: While multiple parallel views are a powerful feature, you'll often be able to manage your interfaces more effectively by nesting your views, and pairing those views with nested states.

(1) Follow the setup instructions detailed above.

(2) Add one or more ui-view to your app, give them names.

<!-- index.html -->
<body>
    <div ui-view="viewA"></div>
    <div ui-view="viewB"></div>
    <!-- Also a way to navigate -->
    <a ui-sref="route1">Route 1</a>
    <a ui-sref="route2">Route 2</a>
</body>

(3) Set up your states in the module config:

myApp.config(function($stateProvider) {
  $stateProvider
    .state('index', {
      url: "",
      views: {
        "viewA": { template: "index.viewA" },
        "viewB": { template: "index.viewB" }
      }
    })
    .state('route1', {
      url: "/route1",
      views: {
        "viewA": { template: "route1.viewA" },
        "viewB": { template: "route1.viewB" }
      }
    })
    .state('route2', {
      url: "/route2",
      views: {
        "viewA": { template: "route2.viewA" },
        "viewB": { template: "route2.viewB" }
      }
    })
});

(4) See this quick start example in action.

Go to Quick Start Plunker for Multiple & Named Views

Resources

Videos

Reporting issues and Contributing

Please read our Contributor guidelines before reporting an issue or creating a pull request.