4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
32 |
33 |
34 |
35 |
36 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/www/js/app.js:
--------------------------------------------------------------------------------
1 | // Ionic Starter App
2 |
3 | // angular.module is a global place for creating, registering and retrieving Angular modules
4 | // 'starter' is the name of this angular module example (also set in a attribute in index.html)
5 | // the 2nd parameter is an array of 'requires'
6 | // 'starter.services' is found in services.js
7 | // 'starter.controllers' is found in controllers.js
8 | angular.module('starter', ['ionic','ionic.service.core', 'starter.controllers', 'starter.services'])
9 |
10 | .run(function($ionicPlatform) {
11 | $ionicPlatform.ready(function() {
12 | // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
13 | // for form inputs)
14 | if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
15 | cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
16 | cordova.plugins.Keyboard.disableScroll(true);
17 |
18 | }
19 | if (window.StatusBar) {
20 | // org.apache.cordova.statusbar required
21 | StatusBar.styleLightContent();
22 | }
23 |
24 | var push = new Ionic.Push({
25 | "debug": true
26 | });
27 |
28 | push.register(function(token) {
29 | console.log("Device token:",token.token);
30 | });
31 | });
32 | })
33 |
34 | .config(function($stateProvider, $urlRouterProvider) {
35 |
36 | // Ionic uses AngularUI Router which uses the concept of states
37 | // Learn more here: https://github.com/angular-ui/ui-router
38 | // Set up the various states which the app can be in.
39 | // Each state's controller can be found in controllers.js
40 | $stateProvider
41 |
42 | // setup an abstract state for the tabs directive
43 | .state('tab', {
44 | url: '/tab',
45 | abstract: true,
46 | templateUrl: 'templates/tabs.html'
47 | })
48 |
49 | // Each tab has its own nav history stack:
50 |
51 | .state('tab.dash', {
52 | url: '/dash',
53 | views: {
54 | 'tab-dash': {
55 | templateUrl: 'templates/tab-dash.html',
56 | controller: 'DashCtrl'
57 | }
58 | }
59 | })
60 |
61 | .state('tab.chats', {
62 | url: '/chats',
63 | views: {
64 | 'tab-chats': {
65 | templateUrl: 'templates/tab-chats.html',
66 | controller: 'ChatsCtrl'
67 | }
68 | }
69 | })
70 | .state('tab.chat-detail', {
71 | url: '/chats/:chatId',
72 | views: {
73 | 'tab-chats': {
74 | templateUrl: 'templates/chat-detail.html',
75 | controller: 'ChatDetailCtrl'
76 | }
77 | }
78 | })
79 |
80 | .state('tab.account', {
81 | url: '/account',
82 | views: {
83 | 'tab-account': {
84 | templateUrl: 'templates/tab-account.html',
85 | controller: 'AccountCtrl'
86 | }
87 | }
88 | });
89 |
90 | // if none of the above states are matched, use this as the fallback
91 | $urlRouterProvider.otherwise('/tab/dash');
92 |
93 | });
94 |
--------------------------------------------------------------------------------
/www/js/controllers.js:
--------------------------------------------------------------------------------
1 | angular.module('starter.controllers', [])
2 |
3 | .controller('DashCtrl', function($scope) {})
4 |
5 | .controller('ChatsCtrl', function($scope, Chats) {
6 | // With the new view caching in Ionic, Controllers are only called
7 | // when they are recreated or on app start, instead of every page change.
8 | // To listen for when this page is active (for example, to refresh data),
9 | // listen for the $ionicView.enter event:
10 | //
11 | //$scope.$on('$ionicView.enter', function(e) {
12 | //});
13 |
14 | $scope.chats = Chats.all();
15 | $scope.remove = function(chat) {
16 | Chats.remove(chat);
17 | };
18 | })
19 |
20 | .controller('ChatDetailCtrl', function($scope, $stateParams, Chats) {
21 | $scope.chat = Chats.get($stateParams.chatId);
22 | })
23 |
24 | .controller('AccountCtrl', function($scope) {
25 | $scope.settings = {
26 | enableFriends: true
27 | };
28 | });
29 |
--------------------------------------------------------------------------------
/www/js/services.js:
--------------------------------------------------------------------------------
1 | angular.module('starter.services', [])
2 |
3 | .factory('Chats', function() {
4 | // Might use a resource here that returns a JSON array
5 |
6 | // Some fake testing data
7 | var chats = [{
8 | id: 0,
9 | name: 'Ben Sparrow',
10 | lastText: 'You on your way?',
11 | face: 'https://pbs.twimg.com/profile_images/514549811765211136/9SgAuHeY.png'
12 | }, {
13 | id: 1,
14 | name: 'Max Lynx',
15 | lastText: 'Hey, it\'s me',
16 | face: 'https://avatars3.githubusercontent.com/u/11214?v=3&s=460'
17 | }, {
18 | id: 2,
19 | name: 'Adam Bradleyson',
20 | lastText: 'I should buy a boat',
21 | face: 'https://pbs.twimg.com/profile_images/479090794058379264/84TKj_qa.jpeg'
22 | }, {
23 | id: 3,
24 | name: 'Perry Governor',
25 | lastText: 'Look at my mukluks!',
26 | face: 'https://pbs.twimg.com/profile_images/598205061232103424/3j5HUXMY.png'
27 | }, {
28 | id: 4,
29 | name: 'Mike Harrington',
30 | lastText: 'This is wicked good ice cream.',
31 | face: 'https://pbs.twimg.com/profile_images/578237281384841216/R3ae1n61.png'
32 | }];
33 |
34 | return {
35 | all: function() {
36 | return chats;
37 | },
38 | remove: function(chat) {
39 | chats.splice(chats.indexOf(chat), 1);
40 | },
41 | get: function(chatId) {
42 | for (var i = 0; i < chats.length; i++) {
43 | if (chats[i].id === parseInt(chatId)) {
44 | return chats[i];
45 | }
46 | }
47 | return null;
48 | }
49 | };
50 | });
51 |
--------------------------------------------------------------------------------
/www/lib/angular-animate/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-animate",
3 | "version": "1.3.13",
4 | "main": "./angular-animate.js",
5 | "ignore": [],
6 | "dependencies": {
7 | "angular": "1.3.13"
8 | },
9 | "homepage": "https://github.com/angular/bower-angular-animate",
10 | "_release": "1.3.13",
11 | "_resolution": {
12 | "type": "version",
13 | "tag": "v1.3.13",
14 | "commit": "f18cb98590471ad9c1e5ae0e57178e9ecb8d384c"
15 | },
16 | "_source": "git://github.com/angular/bower-angular-animate.git",
17 | "_target": "1.3.13",
18 | "_originalSource": "angular-animate"
19 | }
--------------------------------------------------------------------------------
/www/lib/angular-animate/README.md:
--------------------------------------------------------------------------------
1 | # packaged angular-animate
2 |
3 | This repo is for distribution on `npm` and `bower`. The source for this module is in the
4 | [main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngAnimate).
5 | Please file issues and pull requests against that repo.
6 |
7 | ## Install
8 |
9 | You can install this package either with `npm` or with `bower`.
10 |
11 | ### npm
12 |
13 | ```shell
14 | npm install angular-animate
15 | ```
16 |
17 | Add a `
21 | ```
22 |
23 | Then add `ngAnimate` as a dependency for your app:
24 |
25 | ```javascript
26 | angular.module('myApp', ['ngAnimate']);
27 | ```
28 |
29 | Note that this package is not in CommonJS format, so doing `require('angular-animate')` will
30 | return `undefined`.
31 |
32 | ### bower
33 |
34 | ```shell
35 | bower install angular-animate
36 | ```
37 |
38 | Then add a `
42 | ```
43 |
44 | Then add `ngAnimate` as a dependency for your app:
45 |
46 | ```javascript
47 | angular.module('myApp', ['ngAnimate']);
48 | ```
49 |
50 | ## Documentation
51 |
52 | Documentation is available on the
53 | [AngularJS docs site](http://docs.angularjs.org/api/ngAnimate).
54 |
55 | ## License
56 |
57 | The MIT License
58 |
59 | Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
60 |
61 | Permission is hereby granted, free of charge, to any person obtaining a copy
62 | of this software and associated documentation files (the "Software"), to deal
63 | in the Software without restriction, including without limitation the rights
64 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
65 | copies of the Software, and to permit persons to whom the Software is
66 | furnished to do so, subject to the following conditions:
67 |
68 | The above copyright notice and this permission notice shall be included in
69 | all copies or substantial portions of the Software.
70 |
71 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
72 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
73 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
74 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
75 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
76 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
77 | THE SOFTWARE.
78 |
--------------------------------------------------------------------------------
/www/lib/angular-animate/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-animate",
3 | "version": "1.3.13",
4 | "main": "./angular-animate.js",
5 | "ignore": [],
6 | "dependencies": {
7 | "angular": "1.3.13"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/www/lib/angular-animate/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-animate",
3 | "version": "1.3.13",
4 | "description": "AngularJS module for animations",
5 | "main": "angular-animate.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "https://github.com/angular/angular.js.git"
12 | },
13 | "keywords": [
14 | "angular",
15 | "framework",
16 | "browser",
17 | "animation",
18 | "client-side"
19 | ],
20 | "author": "Angular Core Team ",
21 | "license": "MIT",
22 | "bugs": {
23 | "url": "https://github.com/angular/angular.js/issues"
24 | },
25 | "homepage": "http://angularjs.org"
26 | }
27 |
--------------------------------------------------------------------------------
/www/lib/angular-sanitize/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-sanitize",
3 | "version": "1.3.13",
4 | "main": "./angular-sanitize.js",
5 | "ignore": [],
6 | "dependencies": {
7 | "angular": "1.3.13"
8 | },
9 | "homepage": "https://github.com/angular/bower-angular-sanitize",
10 | "_release": "1.3.13",
11 | "_resolution": {
12 | "type": "version",
13 | "tag": "v1.3.13",
14 | "commit": "ee7a595d32ae566701da29873eb1dfb466e3cfef"
15 | },
16 | "_source": "git://github.com/angular/bower-angular-sanitize.git",
17 | "_target": "1.3.13",
18 | "_originalSource": "angular-sanitize"
19 | }
--------------------------------------------------------------------------------
/www/lib/angular-sanitize/README.md:
--------------------------------------------------------------------------------
1 | # packaged angular-sanitize
2 |
3 | This repo is for distribution on `npm` and `bower`. The source for this module is in the
4 | [main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngSanitize).
5 | Please file issues and pull requests against that repo.
6 |
7 | ## Install
8 |
9 | You can install this package either with `npm` or with `bower`.
10 |
11 | ### npm
12 |
13 | ```shell
14 | npm install angular-sanitize
15 | ```
16 |
17 | Add a `
21 | ```
22 |
23 | Then add `ngSanitize` as a dependency for your app:
24 |
25 | ```javascript
26 | angular.module('myApp', ['ngSanitize']);
27 | ```
28 |
29 | Note that this package is not in CommonJS format, so doing `require('angular-sanitize')` will
30 | return `undefined`.
31 |
32 | ### bower
33 |
34 | ```shell
35 | bower install angular-sanitize
36 | ```
37 |
38 | Add a `
42 | ```
43 |
44 | Then add `ngSanitize` as a dependency for your app:
45 |
46 | ```javascript
47 | angular.module('myApp', ['ngSanitize']);
48 | ```
49 |
50 | ## Documentation
51 |
52 | Documentation is available on the
53 | [AngularJS docs site](http://docs.angularjs.org/api/ngSanitize).
54 |
55 | ## License
56 |
57 | The MIT License
58 |
59 | Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
60 |
61 | Permission is hereby granted, free of charge, to any person obtaining a copy
62 | of this software and associated documentation files (the "Software"), to deal
63 | in the Software without restriction, including without limitation the rights
64 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
65 | copies of the Software, and to permit persons to whom the Software is
66 | furnished to do so, subject to the following conditions:
67 |
68 | The above copyright notice and this permission notice shall be included in
69 | all copies or substantial portions of the Software.
70 |
71 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
72 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
73 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
74 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
75 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
76 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
77 | THE SOFTWARE.
78 |
--------------------------------------------------------------------------------
/www/lib/angular-sanitize/angular-sanitize.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | AngularJS v1.3.13
3 | (c) 2010-2014 Google, Inc. http://angularjs.org
4 | License: MIT
5 | */
6 | (function(n,h,p){'use strict';function E(a){var d=[];s(d,h.noop).chars(a);return d.join("")}function g(a){var d={};a=a.split(",");var c;for(c=0;c=c;e--)d.end&&d.end(f[e]);f.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,k,f=[],m=a,l;for(f.last=function(){return f[f.length-1]};a;){l="";k=!0;if(f.last()&&x[f.last()])a=a.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(a,b){b=b.replace(H,"$1").replace(I,"$1");d.chars&&d.chars(r(b));return""}),e("",f.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",b)===b&&(d.comment&&
8 | d.comment(a.substring(4,b)),a=a.substring(b+3),k=!1);else if(y.test(a)){if(b=a.match(y))a=a.replace(b[0],""),k=!1}else if(J.test(a)){if(b=a.match(z))a=a.substring(b[0].length),b[0].replace(z,e),k=!1}else K.test(a)&&((b=a.match(A))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(A,c)),k=!1):(l+="<",a=a.substring(1)));k&&(b=a.indexOf("<"),l+=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),d.chars&&d.chars(r(l)))}if(a==m)throw L("badparse",a);m=a}e()}function r(a){if(!a)return"";var d=M.exec(a);a=d[1];
9 | var c=d[3];if(d=d[2])q.innerHTML=d.replace(//g,">")}function s(a,d){var c=!1,e=h.bind(a,a.push);return{start:function(a,k,f){a=h.lowercase(a);!c&&x[a]&&(c=a);c||!0!==C[a]||(e("<"),e(a),
10 | h.forEach(k,function(c,f){var k=h.lowercase(f),g="img"===a&&"src"===k||"background"===k;!0!==P[k]||!0===D[k]&&!d(c,g)||(e(" "),e(f),e('="'),e(B(c)),e('"'))}),e(f?"/>":">"))},end:function(a){a=h.lowercase(a);c||!0!==C[a]||(e(""),e(a),e(">"));a==c&&(c=!1)},chars:function(a){c||e(B(a))}}}var L=h.$$minErr("$sanitize"),A=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,z=/^<\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,
11 | K=/^,J=/^<\//,H=/\x3c!--(.*?)--\x3e/g,y=/]*?)>/i,I=/"\u201d\u2019]/,c=/^mailto:/;return function(e,b){function k(a){a&&g.push(E(a))}
15 | function f(a,c){g.push("');k(c);g.push("")}if(!e)return e;for(var m,l=e,g=[],n,p;m=l.match(d);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),p=m.index,k(l.substr(0,p)),f(n,m[0].replace(c,"")),l=l.substring(p+m[0].length);k(l);return a(g.join(""))}}])})(window,window.angular);
16 | //# sourceMappingURL=angular-sanitize.min.js.map
17 |
--------------------------------------------------------------------------------
/www/lib/angular-sanitize/angular-sanitize.min.js.map:
--------------------------------------------------------------------------------
1 | {
2 | "version":3,
3 | "file":"angular-sanitize.min.js",
4 | "lineCount":15,
5 | "mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAkJtCC,QAASA,EAAY,CAACC,CAAD,CAAQ,CAC3B,IAAIC,EAAM,EACGC,EAAAC,CAAmBF,CAAnBE,CAAwBN,CAAAO,KAAxBD,CACbH,MAAA,CAAaA,CAAb,CACA,OAAOC,EAAAI,KAAA,CAAS,EAAT,CAJoB,CAmG7BC,QAASA,EAAO,CAACC,CAAD,CAAM,CAAA,IAChBC,EAAM,EAAIC,EAAAA,CAAQF,CAAAG,MAAA,C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O,EAFX,CAGIiG,CAHJ,CAIIpG,CACJ,CAAQsB,CAAR,CAAgBgF,CAAAhF,MAAA,CAAUyE,CAAV,CAAhB,CAAA,CAEEK,CAQA,CARM9E,CAAA,CAAM,CAAN,CAQN,CANKA,CAAA,CAAM,CAAN,CAML,EANkBA,CAAA,CAAM,CAAN,CAMlB,GALE8E,CAKF,EALS9E,CAAA,CAAM,CAAN,CAAA,CAAW,SAAX,CAAuB,SAKhC,EAL6C8E,CAK7C,EAHApG,CAGA,CAHIsB,CAAAS,MAGJ,CAFAmE,CAAA,CAAQI,CAAAC,OAAA,CAAW,CAAX,CAAcvG,CAAd,CAAR,CAEA,CADAmG,CAAA,CAAQC,CAAR,CAAa9E,CAAA,CAAM,CAAN,CAAAF,QAAA,CAAiB4E,CAAjB,CAAgC,EAAhC,CAAb,CACA,CAAAM,CAAA,CAAMA,CAAA5D,UAAA,CAAc1C,CAAd,CAAkBsB,CAAA,CAAM,CAAN,CAAArB,OAAlB,CAERiG,EAAA,CAAQI,CAAR,CACA,OAAOR,EAAA,CAAU3F,CAAAT,KAAA,CAAU,EAAV,CAAV,CApBqB,CAL+C,CAAlC,CAA7C,CAhnBsC,CAArC,CAAD,CAmqBGT,MAnqBH,CAmqBWA,MAAAC,QAnqBX;",
6 | "sources":["angular-sanitize.js"],
7 | "names":["window","angular","undefined","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","makeMap","str","obj","items","split","i","length","htmlParser","html","handler","parseStartTag","tag","tagName","rest","unary","lowercase","blockElements","stack","last","inlineElements","parseEndTag","optionalEndTagElements","voidElements","push","attrs","replace","ATTR_REGEXP","match","name","doubleQuotedValue","singleQuotedValue","unquotedValue","decodeEntities","start","pos","end","index","text","stack.last","specialElements","RegExp","all","COMMENT_REGEXP","CDATA_REGEXP","indexOf","lastIndexOf","comment","substring","DOCTYPE_REGEXP","test","BEGING_END_TAGE_REGEXP","END_TAG_REGEXP","BEGIN_TAG_REGEXP","START_TAG_REGEXP","$sanitizeMinErr","value","parts","spaceRe","exec","spaceBefore","spaceAfter","content","hiddenPre","innerHTML","textContent","innerText","encodeEntities","SURROGATE_PAIR_REGEXP","hi","charCodeAt","low","NON_ALPHANUMERIC_REGEXP","uriValidator","ignore","out","bind","validElements","forEach","key","lkey","isImage","validAttrs","uriAttrs","$$minErr","optionalEndTagBlockElements","optionalEndTagInlineElements","extend","svgElements","htmlAttrs","svgAttrs","document","createElement","module","provider","$SanitizeProvider","$get","$$sanitizeUri","uri","filter","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","target","addText","addLink","url","isDefined","raw","substr"]
8 | }
9 |
--------------------------------------------------------------------------------
/www/lib/angular-sanitize/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-sanitize",
3 | "version": "1.3.13",
4 | "main": "./angular-sanitize.js",
5 | "ignore": [],
6 | "dependencies": {
7 | "angular": "1.3.13"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/www/lib/angular-sanitize/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-sanitize",
3 | "version": "1.3.13",
4 | "description": "AngularJS module for sanitizing HTML",
5 | "main": "angular-sanitize.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "https://github.com/angular/angular.js.git"
12 | },
13 | "keywords": [
14 | "angular",
15 | "framework",
16 | "browser",
17 | "html",
18 | "client-side"
19 | ],
20 | "author": "Angular Core Team ",
21 | "license": "MIT",
22 | "bugs": {
23 | "url": "https://github.com/angular/angular.js/issues"
24 | },
25 | "homepage": "http://angularjs.org"
26 | }
27 |
--------------------------------------------------------------------------------
/www/lib/angular-ui-router/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-ui-router",
3 | "version": "0.2.13",
4 | "main": "./release/angular-ui-router.js",
5 | "dependencies": {
6 | "angular": ">= 1.0.8"
7 | },
8 | "ignore": [
9 | "**/.*",
10 | "node_modules",
11 | "bower_components",
12 | "component.json",
13 | "package.json",
14 | "lib",
15 | "config",
16 | "sample",
17 | "test",
18 | "tests",
19 | "ngdoc_assets",
20 | "Gruntfile.js",
21 | "files.js"
22 | ],
23 | "homepage": "https://github.com/angular-ui/ui-router",
24 | "_release": "0.2.13",
25 | "_resolution": {
26 | "type": "version",
27 | "tag": "0.2.13",
28 | "commit": "c3d543aae43d4600512520a0d70723ac31f2cb62"
29 | },
30 | "_source": "git://github.com/angular-ui/ui-router.git",
31 | "_target": "0.2.13",
32 | "_originalSource": "angular-ui-router"
33 | }
--------------------------------------------------------------------------------
/www/lib/angular-ui-router/CONTRIBUTING.md:
--------------------------------------------------------------------------------
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 grunt >= 0.4.x. Make sure to upgrade your environment and read the
53 | [Migration Guide](http://gruntjs.com/upgrading-from-0.3-to-0.4).
54 |
55 | Dependencies for building from source and running tests:
56 |
57 | * [grunt-cli](https://github.com/gruntjs/grunt-cli) - run: `$ npm install -g grunt-cli`
58 | * Then, install the development dependencies by running `$ npm install` from the project directory
59 |
60 | There are a number of targets in the gruntfile that are used to generating different builds:
61 |
62 | * `grunt`: Perform a normal build, runs jshint and karma tests
63 | * `grunt build`: Perform a normal build
64 | * `grunt dist`: Perform a clean build and generate documentation
65 | * `grunt dev`: Run dev server (sample app) and watch for changes, builds and runs karma tests on changes.
66 |
--------------------------------------------------------------------------------
/www/lib/angular-ui-router/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) 2014 The AngularUI Team, Karsten Sperling
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 |
--------------------------------------------------------------------------------
/www/lib/angular-ui-router/README.md:
--------------------------------------------------------------------------------
1 | # AngularUI Router [](https://travis-ci.org/angular-ui/ui-router)
2 |
3 | #### The de-facto solution to flexible routing with nested views
4 | ---
5 | **[Download 0.2.11](http://angular-ui.github.io/ui-router/release/angular-ui-router.js)** (or **[Minified](http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js)**) **|**
6 | **[Guide](https://github.com/angular-ui/ui-router/wiki) |**
7 | **[API](http://angular-ui.github.io/ui-router/site) |**
8 | **[Sample](http://angular-ui.github.com/ui-router/sample/) ([Src](https://github.com/angular-ui/ui-router/tree/gh-pages/sample)) |**
9 | **[FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions) |**
10 | **[Resources](#resources) |**
11 | **[Report an Issue](https://github.com/angular-ui/ui-router/blob/master/CONTRIBUTING.md#report-an-issue) |**
12 | **[Contribute](https://github.com/angular-ui/ui-router/blob/master/CONTRIBUTING.md#contribute) |**
13 | **[Help!](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router) |**
14 | **[Discuss](https://groups.google.com/forum/#!categories/angular-ui/router)**
15 |
16 | ---
17 |
18 | AngularUI Router is a routing framework for [AngularJS](http://angularjs.org), which allows you to organize the
19 | parts of your interface into a [*state machine*](https://en.wikipedia.org/wiki/Finite-state_machine). Unlike the
20 | [`$route` service](http://docs.angularjs.org/api/ngRoute.$route) in the Angular ngRoute module, which is organized around URL
21 | routes, UI-Router is organized around [*states*](https://github.com/angular-ui/ui-router/wiki),
22 | which may optionally have routes, as well as other behavior, attached.
23 |
24 | States are bound to *named*, *nested* and *parallel views*, allowing you to powerfully manage your application's interface.
25 |
26 | Check out the sample app: http://angular-ui.github.io/ui-router/sample/
27 |
28 | -
29 | **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.*
30 |
31 |
32 | ## Get Started
33 |
34 | **(1)** Get UI-Router in one of the following ways:
35 | - clone & [build](CONTRIBUTING.md#developing) this repository
36 | - [download the release](http://angular-ui.github.io/ui-router/release/angular-ui-router.js) (or [minified](http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js))
37 | - via **[Bower](http://bower.io/)**: by running `$ bower install angular-ui-router` from your console
38 | - or via **[npm](https://www.npmjs.org/)**: by running `$ npm install angular-ui-router` from your console
39 | - or via **[Component](https://github.com/component/component)**: by running `$ component install angular-ui/ui-router` from your console
40 |
41 | **(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)
42 |
43 | **(3)** Add `'ui.router'` to your main module's list of dependencies (For Component users: replace `'ui.router'` with `require('angular-ui-router')`)
44 |
45 | When you're done, your setup should look similar to the following:
46 |
47 | >
48 | ```html
49 |
50 |
51 |
52 |
53 |
54 |
59 | ...
60 |
61 |
62 | ...
63 |
64 |
65 | ```
66 |
67 | ### [Nested States & Views](http://plnkr.co/edit/u18KQc?p=preview)
68 |
69 | The majority of UI-Router's power is in its ability to nest states & views.
70 |
71 | **(1)** First, follow the [setup](#get-started) instructions detailed above.
72 |
73 | **(2)** Then, add a [`ui-view` directive](https://github.com/angular-ui/ui-router/wiki/Quick-Reference#ui-view) to the `` of your app.
74 |
75 | >
76 | ```html
77 |
78 |
79 |
80 |
81 | State 1
82 | State 2
83 |
84 | ```
85 |
86 | **(3)** You'll notice we also added some links with [`ui-sref` directives](https://github.com/angular-ui/ui-router/wiki/Quick-Reference#ui-sref). In addition to managing state transitions, this directive auto-generates the `href` attribute of the `` 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.
87 |
88 | >
89 | ```html
90 |
91 |
State 1
92 |
93 | Show List
94 |
95 | ```
96 | ```html
97 |
98 |
State 2
99 |
100 | Show List
101 |
102 | ```
103 |
104 | **(4)** Next, we'll add some child templates. *These* will get plugged into the `ui-view` of their parent state templates.
105 |
106 | >
107 | ```html
108 |
109 |
List of State 1 Items
110 |
111 |
{{ item }}
112 |
113 | ```
114 |
115 | >
116 | ```html
117 |
118 |
List of State 2 Things
119 |
120 |
{{ thing }}
121 |
122 | ```
123 |
124 | **(5)** Finally, we'll wire it all up with `$stateProvider`. Set up your states in the module config, as in the following:
125 |
126 |
127 | >
128 | ```javascript
129 | myApp.config(function($stateProvider, $urlRouterProvider) {
130 | //
131 | // For any unmatched url, redirect to /state1
132 | $urlRouterProvider.otherwise("/state1");
133 | //
134 | // Now set up the states
135 | $stateProvider
136 | .state('state1', {
137 | url: "/state1",
138 | templateUrl: "partials/state1.html"
139 | })
140 | .state('state1.list', {
141 | url: "/list",
142 | templateUrl: "partials/state1.list.html",
143 | controller: function($scope) {
144 | $scope.items = ["A", "List", "Of", "Items"];
145 | }
146 | })
147 | .state('state2', {
148 | url: "/state2",
149 | templateUrl: "partials/state2.html"
150 | })
151 | .state('state2.list', {
152 | url: "/list",
153 | templateUrl: "partials/state2.list.html",
154 | controller: function($scope) {
155 | $scope.things = ["A", "Set", "Of", "Things"];
156 | }
157 | });
158 | });
159 | ```
160 |
161 | **(6)** See this quick start example in action.
162 | >**[Go to Quick Start Plunker for Nested States & Views](http://plnkr.co/edit/u18KQc?p=preview)**
163 |
164 | **(7)** This only scratches the surface
165 | >**[Dive Deeper!](https://github.com/angular-ui/ui-router/wiki)**
166 |
167 |
168 | ### [Multiple & Named Views](http://plnkr.co/edit/SDOcGS?p=preview)
169 |
170 | Another great feature is the ability to have multiple `ui-view`s view per template.
171 |
172 | **Pro Tip:** *While multiple parallel views are a powerful feature, you'll often be able to manage your
173 | interfaces more effectively by nesting your views, and pairing those views with nested states.*
174 |
175 | **(1)** Follow the [setup](#get-started) instructions detailed above.
176 |
177 | **(2)** Add one or more `ui-view` to your app, give them names.
178 | >
179 | ```html
180 |
181 |
182 |
183 |
184 |
185 | Route 1
186 | Route 2
187 |
188 | ```
189 |
190 | **(3)** Set up your states in the module config:
191 | >
192 | ```javascript
193 | myApp.config(function($stateProvider) {
194 | $stateProvider
195 | .state('index', {
196 | url: "",
197 | views: {
198 | "viewA": { template: "index.viewA" },
199 | "viewB": { template: "index.viewB" }
200 | }
201 | })
202 | .state('route1', {
203 | url: "/route1",
204 | views: {
205 | "viewA": { template: "route1.viewA" },
206 | "viewB": { template: "route1.viewB" }
207 | }
208 | })
209 | .state('route2', {
210 | url: "/route2",
211 | views: {
212 | "viewA": { template: "route2.viewA" },
213 | "viewB": { template: "route2.viewB" }
214 | }
215 | })
216 | });
217 | ```
218 |
219 | **(4)** See this quick start example in action.
220 | >**[Go to Quick Start Plunker for Multiple & Named Views](http://plnkr.co/edit/SDOcGS?p=preview)**
221 |
222 |
223 | ## Resources
224 |
225 | * [In-Depth Guide](https://github.com/angular-ui/ui-router/wiki)
226 | * [API Reference](http://angular-ui.github.io/ui-router/site)
227 | * [Sample App](http://angular-ui.github.com/ui-router/sample/) ([Source](https://github.com/angular-ui/ui-router/tree/gh-pages/sample))
228 | * [FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions)
229 | * [Slides comparing ngRoute to ui-router](http://slid.es/timkindberg/ui-router#/)
230 | * [UI-Router Extras / Addons](http://christopherthielen.github.io/ui-router-extras/#/home) (@christopherthielen)
231 |
232 | ### Videos
233 |
234 | * [Introduction Video](https://egghead.io/lessons/angularjs-introduction-ui-router) (egghead.io)
235 | * [Tim Kindberg on Angular UI-Router](https://www.youtube.com/watch?v=lBqiZSemrqg)
236 | * [Activating States](https://egghead.io/lessons/angularjs-ui-router-activating-states) (egghead.io)
237 | * [Learn Angular.js using UI-Router](http://youtu.be/QETUuZ27N0w) (LearnCode.academy)
238 |
239 |
240 |
241 | ## Reporting issues and Contributing
242 |
243 | Please read our [Contributor guidelines](CONTRIBUTING.md) before reporting an issue or creating a pull request.
244 |
--------------------------------------------------------------------------------
/www/lib/angular-ui-router/api/angular-ui-router.d.ts:
--------------------------------------------------------------------------------
1 | // Type definitions for Angular JS 1.1.5+ (ui.router module)
2 | // Project: https://github.com/angular-ui/ui-router
3 | // Definitions by: Michel Salib
4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped
5 |
6 | declare module ng.ui {
7 |
8 | interface IState {
9 | name?: string;
10 | template?: string;
11 | templateUrl?: any; // string || () => string
12 | templateProvider?: any; // () => string || IPromise
13 | controller?: any;
14 | controllerAs?: string;
15 | controllerProvider?: any;
16 | resolve?: {};
17 | url?: string;
18 | params?: any;
19 | views?: {};
20 | abstract?: boolean;
21 | onEnter?: (...args: any[]) => void;
22 | onExit?: (...args: any[]) => void;
23 | data?: any;
24 | reloadOnSearch?: boolean;
25 | }
26 |
27 | interface ITypedState extends IState {
28 | data?: T;
29 | }
30 |
31 | interface IStateProvider extends IServiceProvider {
32 | state(name: string, config: IState): IStateProvider;
33 | state(config: IState): IStateProvider;
34 | decorator(name?: string, decorator?: (state: IState, parent: Function) => any): any;
35 | }
36 |
37 | interface IUrlMatcher {
38 | concat(pattern: string): IUrlMatcher;
39 | exec(path: string, searchParams: {}): {};
40 | parameters(): string[];
41 | format(values: {}): string;
42 | }
43 |
44 | interface IUrlMatcherFactory {
45 | compile(pattern: string): IUrlMatcher;
46 | isMatcher(o: any): boolean;
47 | }
48 |
49 | interface IUrlRouterProvider extends IServiceProvider {
50 | when(whenPath: RegExp, handler: Function): IUrlRouterProvider;
51 | when(whenPath: RegExp, handler: any[]): IUrlRouterProvider;
52 | when(whenPath: RegExp, toPath: string): IUrlRouterProvider;
53 | when(whenPath: IUrlMatcher, hanlder: Function): IUrlRouterProvider;
54 | when(whenPath: IUrlMatcher, handler: any[]): IUrlRouterProvider;
55 | when(whenPath: IUrlMatcher, toPath: string): IUrlRouterProvider;
56 | when(whenPath: string, handler: Function): IUrlRouterProvider;
57 | when(whenPath: string, handler: any[]): IUrlRouterProvider;
58 | when(whenPath: string, toPath: string): IUrlRouterProvider;
59 | otherwise(handler: Function): IUrlRouterProvider;
60 | otherwise(handler: any[]): IUrlRouterProvider;
61 | otherwise(path: string): IUrlRouterProvider;
62 | rule(handler: Function): IUrlRouterProvider;
63 | rule(handler: any[]): IUrlRouterProvider;
64 | }
65 |
66 | interface IStateOptions {
67 | location?: any;
68 | inherit?: boolean;
69 | relative?: IState;
70 | notify?: boolean;
71 | reload?: boolean;
72 | }
73 |
74 | interface IHrefOptions {
75 | lossy?: boolean;
76 | inherit?: boolean;
77 | relative?: IState;
78 | absolute?: boolean;
79 | }
80 |
81 | interface IStateService {
82 | go(to: string, params?: {}, options?: IStateOptions): IPromise;
83 | transitionTo(state: string, params?: {}, updateLocation?: boolean): void;
84 | transitionTo(state: string, params?: {}, options?: IStateOptions): void;
85 | includes(state: string, params?: {}): boolean;
86 | is(state:string, params?: {}): boolean;
87 | is(state: IState, params?: {}): boolean;
88 | href(state: IState, params?: {}, options?: IHrefOptions): string;
89 | href(state: string, params?: {}, options?: IHrefOptions): string;
90 | get(state: string): IState;
91 | get(): IState[];
92 | current: IState;
93 | params: any;
94 | reload(): void;
95 | }
96 |
97 | interface IStateParamsService {
98 | [key: string]: any;
99 | }
100 |
101 | interface IStateParams {
102 | [key: string]: any;
103 | }
104 |
105 | interface IUrlRouterService {
106 | /*
107 | * Triggers an update; the same update that happens when the address bar
108 | * url changes, aka $locationChangeSuccess.
109 | *
110 | * This method is useful when you need to use preventDefault() on the
111 | * $locationChangeSuccess event, perform some custom logic (route protection,
112 | * auth, config, redirection, etc) and then finally proceed with the transition
113 | * by calling $urlRouter.sync().
114 | *
115 | */
116 | sync(): void;
117 | }
118 |
119 | interface IUiViewScrollProvider {
120 | /*
121 | * Reverts back to using the core $anchorScroll service for scrolling
122 | * based on the url anchor.
123 | */
124 | useAnchorScroll(): void;
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/www/lib/angular-ui-router/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-ui-router",
3 | "version": "0.2.13",
4 | "main": "./release/angular-ui-router.js",
5 | "dependencies": {
6 | "angular": ">= 1.0.8"
7 | },
8 | "ignore": [
9 | "**/.*",
10 | "node_modules",
11 | "bower_components",
12 | "component.json",
13 | "package.json",
14 | "lib",
15 | "config",
16 | "sample",
17 | "test",
18 | "tests",
19 | "ngdoc_assets",
20 | "Gruntfile.js",
21 | "files.js"
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/www/lib/angular-ui-router/src/common.js:
--------------------------------------------------------------------------------
1 | /*jshint globalstrict:true*/
2 | /*global angular:false*/
3 | 'use strict';
4 |
5 | var isDefined = angular.isDefined,
6 | isFunction = angular.isFunction,
7 | isString = angular.isString,
8 | isObject = angular.isObject,
9 | isArray = angular.isArray,
10 | forEach = angular.forEach,
11 | extend = angular.extend,
12 | copy = angular.copy;
13 |
14 | function inherit(parent, extra) {
15 | return extend(new (extend(function() {}, { prototype: parent }))(), extra);
16 | }
17 |
18 | function merge(dst) {
19 | forEach(arguments, function(obj) {
20 | if (obj !== dst) {
21 | forEach(obj, function(value, key) {
22 | if (!dst.hasOwnProperty(key)) dst[key] = value;
23 | });
24 | }
25 | });
26 | return dst;
27 | }
28 |
29 | /**
30 | * Finds the common ancestor path between two states.
31 | *
32 | * @param {Object} first The first state.
33 | * @param {Object} second The second state.
34 | * @return {Array} Returns an array of state names in descending order, not including the root.
35 | */
36 | function ancestors(first, second) {
37 | var path = [];
38 |
39 | for (var n in first.path) {
40 | if (first.path[n] !== second.path[n]) break;
41 | path.push(first.path[n]);
42 | }
43 | return path;
44 | }
45 |
46 | /**
47 | * IE8-safe wrapper for `Object.keys()`.
48 | *
49 | * @param {Object} object A JavaScript object.
50 | * @return {Array} Returns the keys of the object as an array.
51 | */
52 | function objectKeys(object) {
53 | if (Object.keys) {
54 | return Object.keys(object);
55 | }
56 | var result = [];
57 |
58 | angular.forEach(object, function(val, key) {
59 | result.push(key);
60 | });
61 | return result;
62 | }
63 |
64 | /**
65 | * IE8-safe wrapper for `Array.prototype.indexOf()`.
66 | *
67 | * @param {Array} array A JavaScript array.
68 | * @param {*} value A value to search the array for.
69 | * @return {Number} Returns the array index value of `value`, or `-1` if not present.
70 | */
71 | function indexOf(array, value) {
72 | if (Array.prototype.indexOf) {
73 | return array.indexOf(value, Number(arguments[2]) || 0);
74 | }
75 | var len = array.length >>> 0, from = Number(arguments[2]) || 0;
76 | from = (from < 0) ? Math.ceil(from) : Math.floor(from);
77 |
78 | if (from < 0) from += len;
79 |
80 | for (; from < len; from++) {
81 | if (from in array && array[from] === value) return from;
82 | }
83 | return -1;
84 | }
85 |
86 | /**
87 | * Merges a set of parameters with all parameters inherited between the common parents of the
88 | * current state and a given destination state.
89 | *
90 | * @param {Object} currentParams The value of the current state parameters ($stateParams).
91 | * @param {Object} newParams The set of parameters which will be composited with inherited params.
92 | * @param {Object} $current Internal definition of object representing the current state.
93 | * @param {Object} $to Internal definition of object representing state to transition to.
94 | */
95 | function inheritParams(currentParams, newParams, $current, $to) {
96 | var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = [];
97 |
98 | for (var i in parents) {
99 | if (!parents[i].params) continue;
100 | parentParams = objectKeys(parents[i].params);
101 | if (!parentParams.length) continue;
102 |
103 | for (var j in parentParams) {
104 | if (indexOf(inheritList, parentParams[j]) >= 0) continue;
105 | inheritList.push(parentParams[j]);
106 | inherited[parentParams[j]] = currentParams[parentParams[j]];
107 | }
108 | }
109 | return extend({}, inherited, newParams);
110 | }
111 |
112 | /**
113 | * Performs a non-strict comparison of the subset of two objects, defined by a list of keys.
114 | *
115 | * @param {Object} a The first object.
116 | * @param {Object} b The second object.
117 | * @param {Array} keys The list of keys within each object to compare. If the list is empty or not specified,
118 | * it defaults to the list of keys in `a`.
119 | * @return {Boolean} Returns `true` if the keys match, otherwise `false`.
120 | */
121 | function equalForKeys(a, b, keys) {
122 | if (!keys) {
123 | keys = [];
124 | for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility
125 | }
126 |
127 | for (var i=0; i
274 | *
275 | *
276 | *
277 | *
278 | *
279 | *
280 | *
284 | *
285 | *
286 | *
287 | *
288 | *
289 | */
290 | angular.module('ui.router', ['ui.router.state']);
291 |
292 | angular.module('ui.router.compat', ['ui.router']);
293 |
--------------------------------------------------------------------------------
/www/lib/angular-ui-router/src/stateFilters.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc filter
3 | * @name ui.router.state.filter:isState
4 | *
5 | * @requires ui.router.state.$state
6 | *
7 | * @description
8 | * Translates to {@link ui.router.state.$state#methods_is $state.is("stateName")}.
9 | */
10 | $IsStateFilter.$inject = ['$state'];
11 | function $IsStateFilter($state) {
12 | var isFilter = function (state) {
13 | return $state.is(state);
14 | };
15 | isFilter.$stateful = true;
16 | return isFilter;
17 | }
18 |
19 | /**
20 | * @ngdoc filter
21 | * @name ui.router.state.filter:includedByState
22 | *
23 | * @requires ui.router.state.$state
24 | *
25 | * @description
26 | * Translates to {@link ui.router.state.$state#methods_includes $state.includes('fullOrPartialStateName')}.
27 | */
28 | $IncludedByStateFilter.$inject = ['$state'];
29 | function $IncludedByStateFilter($state) {
30 | var includesFilter = function (state) {
31 | return $state.includes(state);
32 | };
33 | includesFilter.$stateful = true;
34 | return includesFilter;
35 | }
36 |
37 | angular.module('ui.router.state')
38 | .filter('isState', $IsStateFilter)
39 | .filter('includedByState', $IncludedByStateFilter);
40 |
--------------------------------------------------------------------------------
/www/lib/angular-ui-router/src/templateFactory.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc object
3 | * @name ui.router.util.$templateFactory
4 | *
5 | * @requires $http
6 | * @requires $templateCache
7 | * @requires $injector
8 | *
9 | * @description
10 | * Service. Manages loading of templates.
11 | */
12 | $TemplateFactory.$inject = ['$http', '$templateCache', '$injector'];
13 | function $TemplateFactory( $http, $templateCache, $injector) {
14 |
15 | /**
16 | * @ngdoc function
17 | * @name ui.router.util.$templateFactory#fromConfig
18 | * @methodOf ui.router.util.$templateFactory
19 | *
20 | * @description
21 | * Creates a template from a configuration object.
22 | *
23 | * @param {object} config Configuration object for which to load a template.
24 | * The following properties are search in the specified order, and the first one
25 | * that is defined is used to create the template:
26 | *
27 | * @param {string|object} config.template html string template or function to
28 | * load via {@link ui.router.util.$templateFactory#fromString fromString}.
29 | * @param {string|object} config.templateUrl url to load or a function returning
30 | * the url to load via {@link ui.router.util.$templateFactory#fromUrl fromUrl}.
31 | * @param {Function} config.templateProvider function to invoke via
32 | * {@link ui.router.util.$templateFactory#fromProvider fromProvider}.
33 | * @param {object} params Parameters to pass to the template function.
34 | * @param {object} locals Locals to pass to `invoke` if the template is loaded
35 | * via a `templateProvider`. Defaults to `{ params: params }`.
36 | *
37 | * @return {string|object} The template html as a string, or a promise for
38 | * that string,or `null` if no template is configured.
39 | */
40 | this.fromConfig = function (config, params, locals) {
41 | return (
42 | isDefined(config.template) ? this.fromString(config.template, params) :
43 | isDefined(config.templateUrl) ? this.fromUrl(config.templateUrl, params) :
44 | isDefined(config.templateProvider) ? this.fromProvider(config.templateProvider, params, locals) :
45 | null
46 | );
47 | };
48 |
49 | /**
50 | * @ngdoc function
51 | * @name ui.router.util.$templateFactory#fromString
52 | * @methodOf ui.router.util.$templateFactory
53 | *
54 | * @description
55 | * Creates a template from a string or a function returning a string.
56 | *
57 | * @param {string|object} template html template as a string or function that
58 | * returns an html template as a string.
59 | * @param {object} params Parameters to pass to the template function.
60 | *
61 | * @return {string|object} The template html as a string, or a promise for that
62 | * string.
63 | */
64 | this.fromString = function (template, params) {
65 | return isFunction(template) ? template(params) : template;
66 | };
67 |
68 | /**
69 | * @ngdoc function
70 | * @name ui.router.util.$templateFactory#fromUrl
71 | * @methodOf ui.router.util.$templateFactory
72 | *
73 | * @description
74 | * Loads a template from the a URL via `$http` and `$templateCache`.
75 | *
76 | * @param {string|Function} url url of the template to load, or a function
77 | * that returns a url.
78 | * @param {Object} params Parameters to pass to the url function.
79 | * @return {string|Promise.} The template html as a string, or a promise
80 | * for that string.
81 | */
82 | this.fromUrl = function (url, params) {
83 | if (isFunction(url)) url = url(params);
84 | if (url == null) return null;
85 | else return $http
86 | .get(url, { cache: $templateCache, headers: { Accept: 'text/html' }})
87 | .then(function(response) { return response.data; });
88 | };
89 |
90 | /**
91 | * @ngdoc function
92 | * @name ui.router.util.$templateFactory#fromProvider
93 | * @methodOf ui.router.util.$templateFactory
94 | *
95 | * @description
96 | * Creates a template by invoking an injectable provider function.
97 | *
98 | * @param {Function} provider Function to invoke via `$injector.invoke`
99 | * @param {Object} params Parameters for the template.
100 | * @param {Object} locals Locals to pass to `invoke`. Defaults to
101 | * `{ params: params }`.
102 | * @return {string|Promise.} The template html as a string, or a promise
103 | * for that string.
104 | */
105 | this.fromProvider = function (provider, params, locals) {
106 | return $injector.invoke(provider, null, locals || { params: params });
107 | };
108 | }
109 |
110 | angular.module('ui.router.util').service('$templateFactory', $TemplateFactory);
111 |
--------------------------------------------------------------------------------
/www/lib/angular-ui-router/src/view.js:
--------------------------------------------------------------------------------
1 |
2 | $ViewProvider.$inject = [];
3 | function $ViewProvider() {
4 |
5 | this.$get = $get;
6 | /**
7 | * @ngdoc object
8 | * @name ui.router.state.$view
9 | *
10 | * @requires ui.router.util.$templateFactory
11 | * @requires $rootScope
12 | *
13 | * @description
14 | *
15 | */
16 | $get.$inject = ['$rootScope', '$templateFactory'];
17 | function $get( $rootScope, $templateFactory) {
18 | return {
19 | // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... })
20 | /**
21 | * @ngdoc function
22 | * @name ui.router.state.$view#load
23 | * @methodOf ui.router.state.$view
24 | *
25 | * @description
26 | *
27 | * @param {string} name name
28 | * @param {object} options option object.
29 | */
30 | load: function load(name, options) {
31 | var result, defaults = {
32 | template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {}
33 | };
34 | options = extend(defaults, options);
35 |
36 | if (options.view) {
37 | result = $templateFactory.fromConfig(options.view, options.params, options.locals);
38 | }
39 | if (result && options.notify) {
40 | /**
41 | * @ngdoc event
42 | * @name ui.router.state.$state#$viewContentLoading
43 | * @eventOf ui.router.state.$view
44 | * @eventType broadcast on root scope
45 | * @description
46 | *
47 | * Fired once the view **begins loading**, *before* the DOM is rendered.
48 | *
49 | * @param {Object} event Event object.
50 | * @param {Object} viewConfig The view config properties (template, controller, etc).
51 | *
52 | * @example
53 | *
54 | *
55 | * $scope.$on('$viewContentLoading',
56 | * function(event, viewConfig){
57 | * // Access to all the view config properties.
58 | * // and one special property 'targetView'
59 | * // viewConfig.targetView
60 | * });
61 | *