-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quita tildes, ñ y deja en minusculas.
- Loading branch information
Jesús Mur Fontanals
committed
Dec 9, 2014
1 parent
5e6e842
commit c45714d
Showing
7 changed files
with
72 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(function () { | ||
var app = angular.module('users', ['ngRoute', 'user.controllers', 'user.directives', 'user.services', 'user.filters']); | ||
|
||
app.config(['$routeProvider',function($routeProvider) { | ||
$routeProvider | ||
.when('/', { | ||
templateUrl: 'views/user-list.html', | ||
controller: 'UserListController' | ||
}) | ||
.when('/:type', { | ||
templateUrl: 'views/user-list.html', | ||
controller: 'UserListController' | ||
}) | ||
.when('/user/:first', { | ||
templateUrl: 'views/user.html', | ||
controller: 'UserController', | ||
controllerAs: 'UserCtrl' | ||
}) | ||
.otherwise({ | ||
redirectTo: '/' | ||
}) | ||
}]); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
(function () { | ||
angular.module('user.filters', []) | ||
// Revisar este filtro | ||
.filter('slugify', function(){ | ||
return function(input){ | ||
if (!input) return ""; | ||
var tittles = "ÃÀÁÄÂÈÉËÊÌÍÏÎÒÓÖÔÙÚÜÛãàáäâèéëêìíïîòóöôùúüûÑñÇç"; | ||
var original = "AAAAAEEEEIIIIOOOOUUUUaaaaaeeeeiiiioooouuuunncc"; | ||
for (var i = 0; i < tittles.length; i++) { | ||
input = input.replace(tittles.charAt(i), original.charAt(i)).toLowerCase(); | ||
}; | ||
console.log(input); | ||
return input; | ||
}; | ||
}); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters