Commit 71e7d2e1 authored by Victor Mocelin's avatar Victor Mocelin

Adicionado lib ngCordova e feita criação do banco

Usa o SQlite para guardar os dados das palestras e das pessoas.
Modificada a tela de criação de Evento, pensando na #1.
parent ed24215e
Pipeline #1145 skipped
......@@ -9,6 +9,7 @@
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="cordova.js"></script>
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
......
......@@ -5,9 +5,9 @@
// the 2nd parameter is an array of 'requires'
// 'starter.services' is found in services.js
// 'starter.controllers' is found in controllers.js
angular.module('app', ['ionic', 'app.controllers', 'app.routes', 'app.services', 'app.directives'])
angular.module('app', ['ionic', 'app.controllers', 'app.routes', 'app.services', 'app.directives', 'ngCordova'])
.run(function($ionicPlatform) {
.run(function($ionicPlatform, $cordovaSQLite, $rootScope) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
......@@ -18,5 +18,11 @@ angular.module('app', ['ionic', 'app.controllers', 'app.routes', 'app.services',
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}
var db = $cordovaSQLite.openDB({name: 'ceitificator.db', iosDatabaseLocation: 'default'});
$cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS pessoas(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, nome TEXT NOT NULL, grr TEXT NOT NULL, email TEXT NOT NULL)");
$cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS palestras(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, nome TEXT NOT NULL, descricao TEXT NOT NULL, data TEXT NOT NULL, local TEXT NOT NULL, horas TEXT NOT NULL)");
$cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS presencas(palestra_id, pessoas_id, FOREIGN KEY(palestra_id) REFERENCES palestras(id), FOREIGN KEY(pessoas_id) REFERENCES pessoas(id))");
});
})
\ No newline at end of file
})
angular.module('app.controllers', [])
.controller('ceitificatorCtrl', function($scope, events) {
$scope.events = events;
.controller('ceitificatorCtrl', function($scope, $ionicPlatform, EventsService) {
$ionicPlatform.ready(function(){
$scope.events = EventsService.getEvents();
console.log($scope.events);
});
})
.controller('novoEventoCtrl', function($scope, events) {
.controller('novoEventoCtrl', function($scope, EventsService) {
$scope.formData = {};
$scope.addNewEvent = function (){
if ((!$scope.formData.newEvent || $scope.formData.newEvent.length === 0 || !$scope.formData.newEvent.trim()) ||
(!$scope.formData.speaker || $scope.formData.speaker.length === 0 || !$scope.formData.speaker.trim()))
if ((!$scope.formData.eventName || $scope.formData.eventName.length === 0 || !$scope.formData.eventName.trim()) ||
(!$scope.formData.eventDesc || $scope.formData.eventDesc.length === 0 || !$scope.formData.eventDesc.trim()) ||
(!$scope.formData.eventDate || $scope.formData.eventDate.length === 0 || !$scope.formData.eventDate.trim()) ||
(!$scope.formData.eventPlace || $scope.formData.eventPlace.length === 0 || !$scope.formData.eventPlace.trim()) ||
(!$scope.formData.eventHours || $scope.formData.eventHours.length === 0 || !$scope.formData.eventHours.trim()))
alert("WTF?");
else
events.push({id: 3, name: $scope.formData.newEvent, speaker: $scope.formData.speaker});
EventsService.addNewEvent({eventName: $scope.formData.eventName, eventDesc: $scope.formData.eventDesc, eventDate: $scope.formData.eventDate, eventPlace: $scope.formData.eventPlace, eventHours: $scope.formData.eventHours});
};
$scope.showCertText = function (){
alert("Certificamos que !NOME! participou " + $scope.formData.eventDesc + " " + $scope.formData.eventName + " na ``I Semana Acadêmica de Informática'', realizada " + $scope.formData.eventDate + " na Universidade Federal do Paraná, " + $scope.formData.eventPlace + ", em Curitiba – PR, com a carga horária total de " + $scope.formData.eventHours + ".");
}
})
.controller('listaDePresenAEventoXCtrl', function($scope, people) {
$scope.people = people;
.controller('listaDePresenAEventoXCtrl', function($scope, PeopleService) {
$scope.people = PeopleService.getPeople();
$scope.scan = function(){
cordova.plugins.barcodeScanner.scan(
function (result) {
$scope.$apply(function(){
people.push({id: '5', data: result.text});
});
console.log(result.text.split(','));
PeopleService.addNewPerson({name: result.text.split(',')[0].trim(), grr: result.text.split(',')[1].trim(), email: result.text.split(',')[2].trim()});
},
function (error) {
alert("Scanning failed: " + error);
......
......@@ -13,34 +13,20 @@ angular.module('app.routes', [])
.state('ceitificator', {
url: '/home',
templateUrl: 'templates/ceitificator.html',
controller: 'ceitificatorCtrl',
resolve: {
events: function(EventsService) {
return EventsService.getEvents();
}
}
controller: 'ceitificatorCtrl'
})
.state('novoEvento', {
url: '/novo-evento',
templateUrl: 'templates/novoEvento.html',
controller: 'novoEventoCtrl',
resolve: {
events: function(EventsService) {
return EventsService.getEvents();
}
}
controller: 'novoEventoCtrl'
})
.state('listaDePresenAEventoX', {
url: '/presenca',
templateUrl: 'templates/listaDePresenAEventoX.html',
controller: 'listaDePresenAEventoXCtrl',
resolve: {
people: function(PeopleService) {
return PeopleService.getPeople();
}
}
controller: 'listaDePresenAEventoXCtrl'
})
$urlRouterProvider.otherwise('/home');
......
......@@ -8,46 +8,60 @@ angular.module('app.services', [])
}])
.service('EventsService', function($q) {
.service('EventsService', function($cordovaSQLite) {
return {
events: [
{
id: '1',
name: 'Pick up apples',
speaker: 'hue'
},
{
id: '2',
name: 'Mow the lawn',
speaker: 'lol'
}
],
getEvents: function() {
return this.events;
events = [];
var db = $cordovaSQLite.openDB({name: 'ceitificator.db', iosDatabaseLocation: 'default'});
$cordovaSQLite.execute(db, "SELECT * FROM palestras")
.then(function(res){
for(var i = 0; i < res.rows.length; i++){
events.push(res.rows.item(i));
}
},
function(err){
console.log("Error");
});
return events;
},
addEvent: function(event){
this.events.push(event);
addNewEvent: function(event){
var db = $cordovaSQLite.openDB({name: 'ceitificator.db', iosDatabaseLocation: 'default'});
var query = "INSERT INTO palestras (nome, descricao, data, local, horas) VALUES (?,?,?,?,?)";
$cordovaSQLite.execute(db, query, [event.eventName, event.eventDesc, event.eventDate, event.eventPlace, event.eventHours])
.then(function(res){
console.log("res: " + res);
}, function (err){
console.error(err);
});
}
};
})
.service('PeopleService', function($q) {
.service('PeopleService', function($cordovaSQLite) {
return {
people: [
{
id: '1',
data: 'Lol'
},
{
id: '2',
data: 'hue'
}
],
getPeople: function() {
return this.people;
people = [];
var db = $cordovaSQLite.openDB({name: 'ceitificator.db', iosDatabaseLocation: 'default'});
$cordovaSQLite.execute(db, "SELECT * FROM pessoas")
.then(function(res){
for(var i = 0; i < res.rows.length; i++){
people.push(res.rows.item(i));
}
},
function(err){
console.log("Error");
});
return people;
},
addPerson: function(person){
this.people.push(person);
addNewPerson: function(person){
var db = $cordovaSQLite.openDB({name: 'ceitificator.db', iosDatabaseLocation: 'default'});
var query = "INSERT INTO pessoas (nome, grr, email) VALUES (?,?,?)";
$cordovaSQLite.execute(db, query, [person.name, person.grr, person.email])
.then(function(res){
console.log("res: " + res);
}, function (err){
console.error(err);
});
}
}
});
{
"name": "angular-animate",
"version": "1.4.3",
"main": "./angular-animate.js",
"ignore": [],
"dependencies": {
"angular": "1.4.3"
},
"homepage": "https://github.com/angular/bower-angular-animate",
"_release": "1.4.3",
"_resolution": {
"type": "version",
"tag": "v1.4.3",
"commit": "4ce2a76359401102d2e0146ccf69e6c060799ff8"
},
"_source": "git://github.com/angular/bower-angular-animate.git",
"_target": "1.4.3",
"_originalSource": "angular-animate"
}
\ No newline at end of file
# packaged angular-animate
This repo is for distribution on `npm` and `bower`. The source for this module is in the
[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngAnimate).
Please file issues and pull requests against that repo.
## Install
You can install this package either with `npm` or with `bower`.
### npm
```shell
npm install angular-animate
```
Then add `ngAnimate` as a dependency for your app:
```javascript
angular.module('myApp', [require('angular-animate')]);
```
### bower
```shell
bower install angular-animate
```
Then add a `<script>` to your `index.html`:
```html
<script src="/bower_components/angular-animate/angular-animate.js"></script>
```
Then add `ngAnimate` as a dependency for your app:
```javascript
angular.module('myApp', ['ngAnimate']);
```
## Documentation
Documentation is available on the
[AngularJS docs site](http://docs.angularjs.org/api/ngAnimate).
## License
The MIT License
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
{
"name": "angular-animate",
"version": "1.4.3",
"main": "./angular-animate.js",
"ignore": [],
"dependencies": {
"angular": "1.4.3"
}
}
require('./angular-animate');
module.exports = 'ngAnimate';
{
"name": "angular-animate",
"version": "1.4.3",
"description": "AngularJS module for animations",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.js.git"
},
"keywords": [
"angular",
"framework",
"browser",
"animation",
"client-side"
],
"author": "Angular Core Team <angular-core+npm@google.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/angular/angular.js/issues"
},
"homepage": "http://angularjs.org"
}
{
"name": "angular-sanitize",
"version": "1.4.3",
"main": "./angular-sanitize.js",
"ignore": [],
"dependencies": {
"angular": "1.4.3"
},
"homepage": "https://github.com/angular/bower-angular-sanitize",
"_release": "1.4.3",
"_resolution": {
"type": "version",
"tag": "v1.4.3",
"commit": "0367ee4c3f9cb8af5d1da9ec35b71a8b523d9fc0"
},
"_source": "git://github.com/angular/bower-angular-sanitize.git",
"_target": "1.4.3",
"_originalSource": "angular-sanitize"
}
\ No newline at end of file
# packaged angular-sanitize
This repo is for distribution on `npm` and `bower`. The source for this module is in the
[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngSanitize).
Please file issues and pull requests against that repo.
## Install
You can install this package either with `npm` or with `bower`.
### npm
```shell
npm install angular-sanitize
```
Then add `ngSanitize` as a dependency for your app:
```javascript
angular.module('myApp', [require('angular-sanitize')]);
```
### bower
```shell
bower install angular-sanitize
```
Add a `<script>` to your `index.html`:
```html
<script src="/bower_components/angular-sanitize/angular-sanitize.js"></script>
```
Then add `ngSanitize` as a dependency for your app:
```javascript
angular.module('myApp', ['ngSanitize']);
```
## Documentation
Documentation is available on the
[AngularJS docs site](http://docs.angularjs.org/api/ngSanitize).
## License
The MIT License
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
This diff is collapsed.
/*
AngularJS v1.4.3
(c) 2010-2015 Google, Inc. http://angularjs.org
License: MIT
*/
(function(n,h,p){'use strict';function E(a){var f=[];r(f,h.noop).chars(a);return f.join("")}function g(a,f){var d={},c=a.split(","),b;for(b=0;b<c.length;b++)d[f?h.lowercase(c[b]):c[b]]=!0;return d}function F(a,f){function d(a,b,d,l){b=h.lowercase(b);if(s[b])for(;e.last()&&t[e.last()];)c("",e.last());u[b]&&e.last()==b&&c("",b);(l=v[b]||!!l)||e.push(b);var m={};d.replace(G,function(b,a,f,c,d){m[a]=q(f||c||d||"")});f.start&&f.start(b,m,l)}function c(b,a){var c=0,d;if(a=h.lowercase(a))for(c=e.length-
1;0<=c&&e[c]!=a;c--);if(0<=c){for(d=e.length-1;d>=c;d--)f.end&&f.end(e[d]);e.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,k,e=[],m=a,l;for(e.last=function(){return e[e.length-1]};a;){l="";k=!0;if(e.last()&&w[e.last()])a=a.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+e.last()+"[^>]*>","i"),function(a,b){b=b.replace(H,"$1").replace(I,"$1");f.chars&&f.chars(q(b));return""}),c("",e.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",
b)===b&&(f.comment&&f.comment(a.substring(4,b)),a=a.substring(b+3),k=!1);else if(x.test(a)){if(b=a.match(x))a=a.replace(b[0],""),k=!1}else if(J.test(a)){if(b=a.match(y))a=a.substring(b[0].length),b[0].replace(y,c),k=!1}else K.test(a)&&((b=a.match(z))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(z,d)),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),f.chars&&f.chars(q(l)))}if(a==m)throw L("badparse",a);m=a}c()}function q(a){if(!a)return"";A.innerHTML=
a.replace(/</g,"&lt;");return A.textContent}function B(a){return a.replace(/&/g,"&amp;").replace(M,function(a){var d=a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(d-55296)+(a-56320)+65536)+";"}).replace(N,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r(a,f){var d=!1,c=h.bind(a,a.push);return{start:function(a,k,e){a=h.lowercase(a);!d&&w[a]&&(d=a);d||!0!==C[a]||(c("<"),c(a),h.forEach(k,function(d,e){var k=h.lowercase(e),g="img"===a&&"src"===k||
"background"===k;!0!==O[k]||!0===D[k]&&!f(d,g)||(c(" "),c(e),c('="'),c(B(d)),c('"'))}),c(e?"/>":">"))},end:function(a){a=h.lowercase(a);d||!0!==C[a]||(c("</"),c(a),c(">"));a==d&&(d=!1)},chars:function(a){d||c(B(a))}}}var L=h.$$minErr("$sanitize"),z=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,y=/^<\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^</,J=/^<\//,H=/\x3c!--(.*?)--\x3e/g,x=/<!DOCTYPE([^>]*?)>/i,
I=/<!\[CDATA\[(.*?)]]\x3e/g,M=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N=/([^\#-~| |!])/g,v=g("area,br,col,hr,img,wbr");n=g("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr");p=g("rp,rt");var u=h.extend({},p,n),s=h.extend({},n,g("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),t=h.extend({},p,g("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var"));
n=g("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan,use");var w=g("script,style"),C=h.extend({},v,s,t,u,n),D=g("background,cite,href,longdesc,src,usemap,xlink:href");n=g("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width");
p=g("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",
!0);var O=h.extend({},D,p,n),A=document.createElement("pre");h.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function(a){return function(f){var d=[];F(f,r(d,function(c,b){return!/^unsafe/.test(a(c,b))}));return d.join("")}}]});h.module("ngSanitize").filter("linky",["$sanitize",function(a){var f=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,d=/^mailto:/i;return function(c,b){function k(a){a&&g.push(E(a))}function e(a,
c){g.push("<a ");h.isDefined(b)&&g.push('target="',b,'" ');g.push('href="',a.replace(/"/g,"&quot;"),'">');k(c);g.push("</a>")}if(!c)return c;for(var m,l=c,g=[],n,p;m=l.match(f);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),p=m.index,k(l.substr(0,p)),e(n,m[0].replace(d,"")),l=l.substring(p+m[0].length);k(l);return a(g.join(""))}}])})(window,window.angular);
//# sourceMappingURL=angular-sanitize.min.js.map
This diff is collapsed.
{
"name": "angular-sanitize",
"version": "1.4.3",
"main": "./angular-sanitize.js",
"ignore": [],
"dependencies": {
"angular": "1.4.3"
}
}
require('./angular-sanitize');
module.exports = 'ngSanitize';
{
"name": "angular-sanitize",
"version": "1.4.3",
"description": "AngularJS module for sanitizing HTML",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.js.git"
},
"keywords": [
"angular",
"framework",
"browser",
"html",
"client-side"
],
"author": "Angular Core Team <angular-core+npm@google.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/angular/angular.js/issues"
},
"homepage": "http://angularjs.org"
}
{
"name": "angular-ui-router",
"version": "0.2.13",
"main": "./release/angular-ui-router.js",
"dependencies": {
"angular": ">= 1.0.8"
},
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"component.json",
"package.json",
"lib",
"config",
"sample",
"test",
"tests",
"ngdoc_assets",
"Gruntfile.js",
"files.js"
],
"homepage": "https://github.com/angular-ui/angular-ui-router-bower",
"_release": "0.2.13",
"_resolution": {
"type": "version",
"tag": "0.2.13",
"commit": "2e580f271defdec34f464aab0cca519e41d1ee33"
},
"_source": "git://github.com/angular-ui/angular-ui-router-bower.git",
"_target": "0.2.13",
"_originalSource": "angular-ui-router"
}
\ No newline at end of file
This diff is collapsed.
# Report an Issue
Help us make UI-Router better! If you think you might have found a bug, or some other weirdness, start by making sure
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)
to see if someone's reported one similar to yours.
If not, then [create a plunkr](http://bit.ly/UIR-Plunk) that demonstrates the problem (try to use as little code
as possible: the more minimalist, the faster we can debug it).
Next, [create a new issue](https://github.com/angular-ui/ui-router/issues/new) that briefly explains the problem,
and provides a bit of background as to the circumstances that triggered it. Don't forget to include the link to
that plunkr you created!
**Note**: If you're unsure how a feature is used, or are encountering some unexpected behavior that you aren't sure
is a bug, it's best to talk it out on
[StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router) before reporting it. This
keeps development streamlined, and helps us focus on building great software.
Issues only! |
-------------|
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). |
####Purple Labels
A purple label means that **you** need to take some further action.
- ![Not Actionable - Need Info](http://angular-ui.github.io/ui-router/images/notactionable.png): Your issue is not specific enough, or there is no clear action that we can take. Please clarify and refine your issue.
- ![Plunkr Please](http://angular-ui.github.io/ui-router/images/plunkrplease.png): Please [create a plunkr](http://bit.ly/UIR-Plunk)
- ![StackOverflow](http://angular-ui.github.io/ui-router/images/stackoverflow.png): 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.
If your issue gets labeled with purple label, no further action will be taken until you respond to the label appropriately.
# Contribute
**(1)** See the **[Developing](#developing)** section below, to get the development version of UI-Router up and running on your local machine.
**(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.
**(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.
**(4)** Finally, commit some code and open a pull request. Code & commits should abide by the following rules:
- *Always* have test coverage for new features (or regression tests for bug fixes), and *never* break existing tests
- Commits should represent one logical change each; if a feature goes through multiple iterations, squash your commits down to one
- 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.
- Changes should always respect the coding style of the project
# Developing
UI-Router uses <code>grunt >= 0.4.x</code>. Make sure to upgrade your environment and read the
[Migration Guide](http://gruntjs.com/upgrading-from-0.3-to-0.4).
Dependencies for building from source and running tests:
* [grunt-cli](https://github.com/gruntjs/grunt-cli) - run: `$ npm install -g grunt-cli`
* Then, install the development dependencies by running `$ npm install` from the project directory
There are a number of targets in the gruntfile that are used to generating different builds:
* `grunt`: Perform a normal build, runs jshint and karma tests
* `grunt build`: Perform a normal build
* `grunt dist`: Perform a clean build and generate documentation
* `grunt dev`: Run dev server (sample app) and watch for changes, builds and runs karma tests on changes.
The MIT License
Copyright (c) 2014 The AngularUI Team, Karsten Sperling
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# AngularUI Router &nbsp;[![Build Status](https://travis-ci.org/angular-ui/ui-router.svg?branch=master)](https://travis-ci.org/angular-ui/ui-router)
#### The de-facto solution to flexible routing with nested views
---
**[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)**) **|**
**[Guide](https://github.com/angular-ui/ui-router/wiki) |**
**[API](http://angular-ui.github.io/ui-router/site) |**
**[Sample](http://angular-ui.github.com/ui-router/sample/) ([Src](https://github.com/angular-ui/ui-router/tree/gh-pages/sample)) |**
**[FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions) |**
**[Resources](#resources) |**
**[Report an Issue](https://github.com/angular-ui/ui-router/blob/master/CONTRIBUTING.md#report-an-issue) |**
**[Contribute](https://github.com/angular-ui/ui-router/blob/master/CONTRIBUTING.md#contribute) |**
**[Help!](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router) |**
**[Discuss](https://groups.google.com/forum/#!categories/angular-ui/router)**
---
AngularUI Router is a routing framework for [AngularJS](http://angularjs.org), which allows you to organize the
parts of your interface into a [*state machine*](https://en.wikipedia.org/wiki/Finite-state_machine). Unlike the
[`$route` service](http://docs.angularjs.org/api/ngRoute.$route) in the Angular ngRoute module, which is organized around URL
routes, UI-Router is organized around [*states*](https://github.com/angular-ui/ui-router/wiki),
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