Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 5b65b1d

Browse files
committed
Created new empty module for listings
1 parent 0caff68 commit 5b65b1d

File tree

6 files changed

+83
-0
lines changed

6 files changed

+83
-0
lines changed

app/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ require('angucomplete-alt')
2222
require('angularjs-toaster')
2323
require('ng-dialog')
2424
require('xml2js')
25+
require('ngreact')
2526

2627
require('appirio-tech-ng-ui-components')
2728
require('appirio-tech-ng-iso-constants')

app/listings/listings.controller.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import angular from 'angular'
2+
import moment from 'moment'
3+
4+
(function () {
5+
'use strict'
6+
7+
angular.module('tc.listings').controller('ListingsCtrl', ListingsCtrl)
8+
9+
ListingsCtrl.$inject = ['CONSTANTS', 'logger', '$q',
10+
'TcAuthService', 'UserService', 'UserStatsService', 'ProfileService', 'ChallengeService', 'ExternalAccountService',
11+
'userHandle', 'profile', 'ngDialog', '$anchorScroll'
12+
]
13+
14+
function ListingsCtrl(CONSTANTS, logger, $q, TcAuthService, UserService, UserStatsService, ProfileService, ChallengeService, ExternalAccountService, userHandle, profile, ngDialog, $anchorScroll) {
15+
var vm = this
16+
// set profile to the object that was resolved
17+
18+
activate()
19+
20+
function activate() {
21+
logger.debug('Calling ListingsController activate()')
22+
23+
}
24+
}
25+
26+
})()

app/listings/listings.jade

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
h1 Yo
2+
p Helooo

app/listings/listings.module.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import angular from 'angular'
2+
3+
(function() {
4+
'use strict'
5+
6+
var dependencies = [
7+
'angular-jwt',
8+
'ui.router',
9+
'ngCookies',
10+
'tc.services',
11+
'tcUIComponents',
12+
'angularSlideables',
13+
'ngDialog',
14+
'react'
15+
]
16+
17+
angular.module('tc.listings', dependencies)
18+
19+
})()

app/listings/listings.routes.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import angular from 'angular'
2+
3+
(function() {
4+
'use strict'
5+
6+
angular.module('tc.listings').config([
7+
'$stateProvider',
8+
routes
9+
]).run(['$rootScope', '$state', function($rootScope, $state) {
10+
$rootScope.$on('$stateChangeError', function(event, toState, toParams, fromState, fromParams, error) {
11+
// if (toState.name.indexOf('sloog') > -1 && 400 <= error.status <= 500 ) {
12+
//
13+
// // unable to find a member with that username
14+
// $state.go('404')
15+
// }
16+
})
17+
}])
18+
19+
function routes($stateProvider) {
20+
var states = {
21+
'listings': {
22+
parent: 'root',
23+
url: '/listings/',
24+
template: require('./listings')(),
25+
controller: 'ListingsCtrl as vm'
26+
}
27+
}
28+
29+
for (var name in states) {
30+
var state = states[name]
31+
$stateProvider.state(name, state)
32+
}
33+
}
34+
})()

app/topcoder.module.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { getCurrentUser, loadUser } from './services/userv3.service.js'
1010
'tc.account',
1111
'tc.peer-review',
1212
'tc.myDashboard',
13+
'tc.listings',
1314
'tc.mySRMs',
1415
'tc.myChallenges',
1516
'tc.profile',

0 commit comments

Comments
 (0)