Skip to content

Commit

Permalink
style(templates): fix indentation and remove empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
romulostorel authored and adamdbradley committed Jun 30, 2016
1 parent 34d663e commit 5fdb110
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 127 deletions.
34 changes: 16 additions & 18 deletions test/html/component-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ <h1>Search</h1>
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);

}
if (window.StatusBar) {
// org.apache.cordova.statusbar required
Expand All @@ -153,7 +152,7 @@ <h1>Search</h1>
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider

.state('app', {
.state('app', {
url: '/app',
abstract: true,
templateUrl: 'templates/menu.html',
Expand All @@ -170,22 +169,23 @@ <h1>Search</h1>
})

.state('app.browse', {
url: '/browse',
views: {
'menuContent': {
templateUrl: 'templates/browse.html'
}
url: '/browse',
views: {
'menuContent': {
templateUrl: 'templates/browse.html'
}
})
.state('app.playlists', {
url: '/playlists',
views: {
'menuContent': {
templateUrl: 'templates/playlists.html',
controller: 'PlaylistsCtrl'
}
}
})

.state('app.playlists', {
url: '/playlists',
views: {
'menuContent': {
templateUrl: 'templates/playlists.html',
controller: 'PlaylistsCtrl'
}
})
}
})

.state('app.single', {
url: '/playlists/:playlistId',
Expand Down Expand Up @@ -265,7 +265,6 @@ <h1>Search</h1>
users.push({imagePath: gandalf, name: 'Gandalf the Grey', subTitle: 'You shall not pass!'});
users.push({imagePath: sam, name: 'Samwise Gamgee', subTitle: 'I made a promise, Mr. Frodo! Don\'t you leave him Samwise Gamgee'});
$scope.users = users;

})

.component('userCell', {
Expand All @@ -275,7 +274,6 @@ <h1>Search</h1>
subTitle: "="
},
controller: function(){

this.$onInit = function(){
console.log("$onInit called: ", this);
}
Expand Down
32 changes: 16 additions & 16 deletions test/html/sidemenu-starter.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ <h1>Search</h1>
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);

}
if (window.StatusBar) {
// org.apache.cordova.statusbar required
Expand All @@ -161,7 +160,7 @@ <h1>Search</h1>
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider

.state('app', {
.state('app', {
url: '/app',
abstract: true,
templateUrl: 'templates/menu.html',
Expand All @@ -178,22 +177,23 @@ <h1>Search</h1>
})

.state('app.browse', {
url: '/browse',
views: {
'menuContent': {
templateUrl: 'templates/browse.html'
}
url: '/browse',
views: {
'menuContent': {
templateUrl: 'templates/browse.html'
}
})
.state('app.playlists', {
url: '/playlists',
views: {
'menuContent': {
templateUrl: 'templates/playlists.html',
controller: 'PlaylistsCtrl'
}
}
})

.state('app.playlists', {
url: '/playlists',
views: {
'menuContent': {
templateUrl: 'templates/playlists.html',
controller: 'PlaylistsCtrl'
}
})
}
})

.state('app.single', {
url: '/playlists/:playlistId',
Expand Down
185 changes: 92 additions & 93 deletions test/html/tabs-starter.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ <h2>Welcome to Ionic</h2>
<ion-nav-view name="tab-account"></ion-nav-view>
</ion-tab>


</ion-tabs>
</script>

Expand Down Expand Up @@ -139,7 +138,7 @@ <h2>Welcome to Ionic</h2>
$stateProvider

// setup an abstract state for the tabs directive
.state('tab', {
.state('tab', {
url: '/tab',
abstract: true,
templateUrl: 'templates/tabs.html'
Expand All @@ -158,23 +157,24 @@ <h2>Welcome to Ionic</h2>
})

.state('tab.chats', {
url: '/chats',
views: {
'tab-chats': {
templateUrl: 'templates/tab-chats.html',
controller: 'ChatsCtrl'
}
url: '/chats',
views: {
'tab-chats': {
templateUrl: 'templates/tab-chats.html',
controller: 'ChatsCtrl'
}
})
.state('tab.chat-detail', {
url: '/chats/:chatId',
views: {
'tab-chats': {
templateUrl: 'templates/chat-detail.html',
controller: 'ChatDetailCtrl'
}
}
})

.state('tab.chat-detail', {
url: '/chats/:chatId',
views: {
'tab-chats': {
templateUrl: 'templates/chat-detail.html',
controller: 'ChatDetailCtrl'
}
})
}
})

.state('tab.account', {
url: '/account',
Expand All @@ -193,84 +193,83 @@ <h2>Welcome to Ionic</h2>

angular.module('starter.controllers', [])

.controller('DashCtrl', function($scope) {})

.controller('ChatsCtrl', function($scope, Chats) {
// With the new view caching in Ionic, Controllers are only called
// when they are recreated or on app start, instead of every page change.
// To listen for when this page is active (for example, to refresh data),
// listen for the $ionicView.enter event:
//
//$scope.$on('$ionicView.enter', function(e) {
//});

$scope.chats = Chats.all();
$scope.remove = function(chat) {
Chats.remove(chat);
};
})

.controller('ChatDetailCtrl', function($scope, $stateParams, Chats) {
$scope.chat = Chats.get($stateParams.chatId);
})

.controller('AccountCtrl', function($scope) {
$scope.settings = {
enableFriends: true
};
});

angular.module('starter.services', [])

.factory('Chats', function() {
// Might use a resource here that returns a JSON array

// Some fake testing data
var chats = [{
id: 0,
name: 'Ben Sparrow',
lastText: 'You on your way?',
face: 'img/ben.png'
}, {
id: 1,
name: 'Max Lynx',
lastText: 'Hey, it\'s me',
face: 'img/max.png'
}, {
id: 2,
name: 'Adam Bradleyson',
lastText: 'I should buy a boat',
face: 'img/adam.jpg'
}, {
id: 3,
name: 'Perry Governor',
lastText: 'Look at my mukluks!',
face: 'img/perry.png'
}, {
id: 4,
name: 'Mike Harrington',
lastText: 'This is wicked good ice cream.',
face: 'img/mike.png'
}];

return {
all: function() {
return chats;
},
remove: function(chat) {
chats.splice(chats.indexOf(chat), 1);
},
get: function(chatId) {
for (var i = 0; i < chats.length; i++) {
if (chats[i].id === parseInt(chatId)) {
return chats[i];
.controller('DashCtrl', function($scope) {})

.controller('ChatsCtrl', function($scope, Chats) {
// With the new view caching in Ionic, Controllers are only called
// when they are recreated or on app start, instead of every page change.
// To listen for when this page is active (for example, to refresh data),
// listen for the $ionicView.enter event:
//
//$scope.$on('$ionicView.enter', function(e) {
//});

$scope.chats = Chats.all();
$scope.remove = function(chat) {
Chats.remove(chat);
};
})

.controller('ChatDetailCtrl', function($scope, $stateParams, Chats) {
$scope.chat = Chats.get($stateParams.chatId);
})

.controller('AccountCtrl', function($scope) {
$scope.settings = {
enableFriends: true
};
});

angular.module('starter.services', [])

.factory('Chats', function() {
// Might use a resource here that returns a JSON array

// Some fake testing data
var chats = [{
id: 0,
name: 'Ben Sparrow',
lastText: 'You on your way?',
face: 'img/ben.png'
}, {
id: 1,
name: 'Max Lynx',
lastText: 'Hey, it\'s me',
face: 'img/max.png'
}, {
id: 2,
name: 'Adam Bradleyson',
lastText: 'I should buy a boat',
face: 'img/adam.jpg'
}, {
id: 3,
name: 'Perry Governor',
lastText: 'Look at my mukluks!',
face: 'img/perry.png'
}, {
id: 4,
name: 'Mike Harrington',
lastText: 'This is wicked good ice cream.',
face: 'img/mike.png'
}];

return {
all: function() {
return chats;
},
remove: function(chat) {
chats.splice(chats.indexOf(chat), 1);
},
get: function(chatId) {
for (var i = 0; i < chats.length; i++) {
if (chats[i].id === parseInt(chatId)) {
return chats[i];
}
}
return null;
}
return null;
}
};
});

};
});

</script>

Expand Down

0 comments on commit 5fdb110

Please sign in to comment.