Skip to content

Commit 5fdb110

Browse files
romulostoreladamdbradley
authored andcommitted
style(templates): fix indentation and remove empty lines
1 parent 34d663e commit 5fdb110

File tree

3 files changed

+124
-127
lines changed

3 files changed

+124
-127
lines changed

Diff for: test/html/component-test.html

+16-18
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ <h1>Search</h1>
141141
if (window.cordova && window.cordova.plugins.Keyboard) {
142142
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
143143
cordova.plugins.Keyboard.disableScroll(true);
144-
145144
}
146145
if (window.StatusBar) {
147146
// org.apache.cordova.statusbar required
@@ -153,7 +152,7 @@ <h1>Search</h1>
153152
.config(function($stateProvider, $urlRouterProvider) {
154153
$stateProvider
155154

156-
.state('app', {
155+
.state('app', {
157156
url: '/app',
158157
abstract: true,
159158
templateUrl: 'templates/menu.html',
@@ -170,22 +169,23 @@ <h1>Search</h1>
170169
})
171170

172171
.state('app.browse', {
173-
url: '/browse',
174-
views: {
175-
'menuContent': {
176-
templateUrl: 'templates/browse.html'
177-
}
172+
url: '/browse',
173+
views: {
174+
'menuContent': {
175+
templateUrl: 'templates/browse.html'
178176
}
179-
})
180-
.state('app.playlists', {
181-
url: '/playlists',
182-
views: {
183-
'menuContent': {
184-
templateUrl: 'templates/playlists.html',
185-
controller: 'PlaylistsCtrl'
186-
}
177+
}
178+
})
179+
180+
.state('app.playlists', {
181+
url: '/playlists',
182+
views: {
183+
'menuContent': {
184+
templateUrl: 'templates/playlists.html',
185+
controller: 'PlaylistsCtrl'
187186
}
188-
})
187+
}
188+
})
189189

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

271270
.component('userCell', {
@@ -275,7 +274,6 @@ <h1>Search</h1>
275274
subTitle: "="
276275
},
277276
controller: function(){
278-
279277
this.$onInit = function(){
280278
console.log("$onInit called: ", this);
281279
}

Diff for: test/html/sidemenu-starter.html

+16-16
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ <h1>Search</h1>
149149
if (window.cordova && window.cordova.plugins.Keyboard) {
150150
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
151151
cordova.plugins.Keyboard.disableScroll(true);
152-
153152
}
154153
if (window.StatusBar) {
155154
// org.apache.cordova.statusbar required
@@ -161,7 +160,7 @@ <h1>Search</h1>
161160
.config(function($stateProvider, $urlRouterProvider) {
162161
$stateProvider
163162

164-
.state('app', {
163+
.state('app', {
165164
url: '/app',
166165
abstract: true,
167166
templateUrl: 'templates/menu.html',
@@ -178,22 +177,23 @@ <h1>Search</h1>
178177
})
179178

180179
.state('app.browse', {
181-
url: '/browse',
182-
views: {
183-
'menuContent': {
184-
templateUrl: 'templates/browse.html'
185-
}
180+
url: '/browse',
181+
views: {
182+
'menuContent': {
183+
templateUrl: 'templates/browse.html'
186184
}
187-
})
188-
.state('app.playlists', {
189-
url: '/playlists',
190-
views: {
191-
'menuContent': {
192-
templateUrl: 'templates/playlists.html',
193-
controller: 'PlaylistsCtrl'
194-
}
185+
}
186+
})
187+
188+
.state('app.playlists', {
189+
url: '/playlists',
190+
views: {
191+
'menuContent': {
192+
templateUrl: 'templates/playlists.html',
193+
controller: 'PlaylistsCtrl'
195194
}
196-
})
195+
}
196+
})
197197

198198
.state('app.single', {
199199
url: '/playlists/:playlistId',

Diff for: test/html/tabs-starter.html

+92-93
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ <h2>Welcome to Ionic</h2>
107107
<ion-nav-view name="tab-account"></ion-nav-view>
108108
</ion-tab>
109109

110-
111110
</ion-tabs>
112111
</script>
113112

@@ -139,7 +138,7 @@ <h2>Welcome to Ionic</h2>
139138
$stateProvider
140139

141140
// setup an abstract state for the tabs directive
142-
.state('tab', {
141+
.state('tab', {
143142
url: '/tab',
144143
abstract: true,
145144
templateUrl: 'templates/tabs.html'
@@ -158,23 +157,24 @@ <h2>Welcome to Ionic</h2>
158157
})
159158

160159
.state('tab.chats', {
161-
url: '/chats',
162-
views: {
163-
'tab-chats': {
164-
templateUrl: 'templates/tab-chats.html',
165-
controller: 'ChatsCtrl'
166-
}
160+
url: '/chats',
161+
views: {
162+
'tab-chats': {
163+
templateUrl: 'templates/tab-chats.html',
164+
controller: 'ChatsCtrl'
167165
}
168-
})
169-
.state('tab.chat-detail', {
170-
url: '/chats/:chatId',
171-
views: {
172-
'tab-chats': {
173-
templateUrl: 'templates/chat-detail.html',
174-
controller: 'ChatDetailCtrl'
175-
}
166+
}
167+
})
168+
169+
.state('tab.chat-detail', {
170+
url: '/chats/:chatId',
171+
views: {
172+
'tab-chats': {
173+
templateUrl: 'templates/chat-detail.html',
174+
controller: 'ChatDetailCtrl'
176175
}
177-
})
176+
}
177+
})
178178

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

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

196-
.controller('DashCtrl', function($scope) {})
197-
198-
.controller('ChatsCtrl', function($scope, Chats) {
199-
// With the new view caching in Ionic, Controllers are only called
200-
// when they are recreated or on app start, instead of every page change.
201-
// To listen for when this page is active (for example, to refresh data),
202-
// listen for the $ionicView.enter event:
203-
//
204-
//$scope.$on('$ionicView.enter', function(e) {
205-
//});
206-
207-
$scope.chats = Chats.all();
208-
$scope.remove = function(chat) {
209-
Chats.remove(chat);
210-
};
211-
})
212-
213-
.controller('ChatDetailCtrl', function($scope, $stateParams, Chats) {
214-
$scope.chat = Chats.get($stateParams.chatId);
215-
})
216-
217-
.controller('AccountCtrl', function($scope) {
218-
$scope.settings = {
219-
enableFriends: true
220-
};
221-
});
222-
223-
angular.module('starter.services', [])
224-
225-
.factory('Chats', function() {
226-
// Might use a resource here that returns a JSON array
227-
228-
// Some fake testing data
229-
var chats = [{
230-
id: 0,
231-
name: 'Ben Sparrow',
232-
lastText: 'You on your way?',
233-
face: 'img/ben.png'
234-
}, {
235-
id: 1,
236-
name: 'Max Lynx',
237-
lastText: 'Hey, it\'s me',
238-
face: 'img/max.png'
239-
}, {
240-
id: 2,
241-
name: 'Adam Bradleyson',
242-
lastText: 'I should buy a boat',
243-
face: 'img/adam.jpg'
244-
}, {
245-
id: 3,
246-
name: 'Perry Governor',
247-
lastText: 'Look at my mukluks!',
248-
face: 'img/perry.png'
249-
}, {
250-
id: 4,
251-
name: 'Mike Harrington',
252-
lastText: 'This is wicked good ice cream.',
253-
face: 'img/mike.png'
254-
}];
255-
256-
return {
257-
all: function() {
258-
return chats;
259-
},
260-
remove: function(chat) {
261-
chats.splice(chats.indexOf(chat), 1);
262-
},
263-
get: function(chatId) {
264-
for (var i = 0; i < chats.length; i++) {
265-
if (chats[i].id === parseInt(chatId)) {
266-
return chats[i];
196+
.controller('DashCtrl', function($scope) {})
197+
198+
.controller('ChatsCtrl', function($scope, Chats) {
199+
// With the new view caching in Ionic, Controllers are only called
200+
// when they are recreated or on app start, instead of every page change.
201+
// To listen for when this page is active (for example, to refresh data),
202+
// listen for the $ionicView.enter event:
203+
//
204+
//$scope.$on('$ionicView.enter', function(e) {
205+
//});
206+
207+
$scope.chats = Chats.all();
208+
$scope.remove = function(chat) {
209+
Chats.remove(chat);
210+
};
211+
})
212+
213+
.controller('ChatDetailCtrl', function($scope, $stateParams, Chats) {
214+
$scope.chat = Chats.get($stateParams.chatId);
215+
})
216+
217+
.controller('AccountCtrl', function($scope) {
218+
$scope.settings = {
219+
enableFriends: true
220+
};
221+
});
222+
223+
angular.module('starter.services', [])
224+
225+
.factory('Chats', function() {
226+
// Might use a resource here that returns a JSON array
227+
228+
// Some fake testing data
229+
var chats = [{
230+
id: 0,
231+
name: 'Ben Sparrow',
232+
lastText: 'You on your way?',
233+
face: 'img/ben.png'
234+
}, {
235+
id: 1,
236+
name: 'Max Lynx',
237+
lastText: 'Hey, it\'s me',
238+
face: 'img/max.png'
239+
}, {
240+
id: 2,
241+
name: 'Adam Bradleyson',
242+
lastText: 'I should buy a boat',
243+
face: 'img/adam.jpg'
244+
}, {
245+
id: 3,
246+
name: 'Perry Governor',
247+
lastText: 'Look at my mukluks!',
248+
face: 'img/perry.png'
249+
}, {
250+
id: 4,
251+
name: 'Mike Harrington',
252+
lastText: 'This is wicked good ice cream.',
253+
face: 'img/mike.png'
254+
}];
255+
256+
return {
257+
all: function() {
258+
return chats;
259+
},
260+
remove: function(chat) {
261+
chats.splice(chats.indexOf(chat), 1);
262+
},
263+
get: function(chatId) {
264+
for (var i = 0; i < chats.length; i++) {
265+
if (chats[i].id === parseInt(chatId)) {
266+
return chats[i];
267+
}
267268
}
269+
return null;
268270
}
269-
return null;
270-
}
271-
};
272-
});
273-
271+
};
272+
});
274273

275274
</script>
276275

0 commit comments

Comments
 (0)