Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

style($route) make some jshint recommended changes #3559

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/ngRoute/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ function $RouteProvider(){
// create redirection for trailing slashes
if (path) {
var redirectPath = (path[path.length-1] == '/')
? path.substr(0, path.length-1)
: path +'/';
? path.substr(0, path.length-1)
: path +'/';

routes[redirectPath] = extend(
{redirectTo: path},
Expand Down Expand Up @@ -428,7 +428,6 @@ function $RouteProvider(){
var m = route.regexp.exec(on);
if (!m) return null;

var N = 0;
for (var i = 1, len = m.length; i < len; ++i) {
var key = keys[i - 1];

Expand Down Expand Up @@ -541,7 +540,7 @@ function $RouteProvider(){
function interpolate(string, params) {
var result = [];
forEach((string||'').split(':'), function(segment, i) {
if (i == 0) {
if (i === 0) {
result.push(segment);
} else {
var segmentMatch = segment.match(/(\w+)(.*)/);
Expand Down