This repository has been archived by the owner on Oct 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from paxtonhare/102-rename-sample
#102 - renamed sample to app
- Loading branch information
Showing
23 changed files
with
135 additions
and
140 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
File renamed without changes.
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 |
---|---|---|
@@ -1,113 +1,20 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
angular.module('sample', [ | ||
angular.module('app', [ | ||
'ml.common', | ||
'ml.search', | ||
'ml.search.tpls', | ||
'ml.utils', | ||
'ngJsonExplorer', | ||
'sample.create', | ||
'sample.detail', | ||
'sample.esriMap', | ||
'sample.search', | ||
'sample.templates', | ||
'sample.user', | ||
'app.create', | ||
'app.detail', | ||
'app.esriMap', | ||
'app.search', | ||
'app.user', | ||
'ui.bootstrap', | ||
'ui.router', | ||
'ui.tinymce' | ||
]) | ||
.config(Config); | ||
]); | ||
|
||
Config.$inject = [ | ||
'$stateProvider', | ||
'$urlMatcherFactoryProvider', | ||
'$urlRouterProvider', | ||
'$locationProvider' | ||
]; | ||
|
||
function Config( | ||
$stateProvider, | ||
$urlMatcherFactoryProvider, | ||
$urlRouterProvider, | ||
$locationProvider) { | ||
|
||
$urlRouterProvider.otherwise('/'); | ||
$locationProvider.html5Mode(true); | ||
|
||
function valToFromString(val) { | ||
return val !== null ? val.toString() : val; | ||
} | ||
|
||
function regexpMatches(val) { // jshint validthis:true | ||
return this.pattern.test(val); | ||
} | ||
|
||
$urlMatcherFactoryProvider.type('path', { | ||
encode: valToFromString, | ||
decode: valToFromString, | ||
is: regexpMatches, | ||
pattern: /.+/ | ||
}); | ||
|
||
$stateProvider | ||
.state('root', { | ||
url: '', | ||
// abstract: true, | ||
templateUrl: 'app/root/root.html', | ||
resolve: { | ||
user: function(userService) { | ||
return userService.getUser(); | ||
} | ||
} | ||
}) | ||
.state('root.landing', { | ||
url: '/', | ||
templateUrl: 'app/landing/landing.html' | ||
}) | ||
.state('root.search', { | ||
url: '/search', | ||
templateUrl: 'app/search/search.html', | ||
controller: 'SearchCtrl', | ||
controllerAs: 'ctrl' | ||
}) | ||
.state('root.create', { | ||
url: '/create', | ||
templateUrl: 'app/create/create.html', | ||
controller: 'CreateCtrl', | ||
controllerAs: 'ctrl', | ||
resolve: { | ||
stuff: function() { | ||
console.log('root.create'); | ||
return null; | ||
} | ||
} | ||
}) | ||
.state('root.view', { | ||
url: '/detail{uri:path}', | ||
params: { | ||
uri: { | ||
squash: true, | ||
value: null | ||
} | ||
}, | ||
templateUrl: 'app/detail/detail.html', | ||
controller: 'DetailCtrl', | ||
controllerAs: 'ctrl', | ||
resolve: { | ||
doc: function(MLRest, $stateParams) { | ||
var uri = $stateParams.uri; | ||
return MLRest.getDocument(uri, { format: 'json' }).then(function(response) { | ||
return response.data; | ||
}); | ||
} | ||
} | ||
}) | ||
.state('root.profile', { | ||
url: '/profile', | ||
templateUrl: 'app/user/profile.html', | ||
controller: 'ProfileCtrl', | ||
controllerAs: 'ctrl' | ||
}); | ||
} | ||
}()); |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
angular.module('sample.create', ['ml.common', 'sample.user']); | ||
angular.module('app.create', ['ml.common', 'app.user']); | ||
}()); |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
angular.module('sample.detail', []); | ||
angular.module('app.detail', []); | ||
}()); |
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,94 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
angular.module('app') | ||
.config(Config); | ||
|
||
Config.$inject = ['$stateProvider', '$urlMatcherFactoryProvider', | ||
'$urlRouterProvider', '$locationProvider' | ||
]; | ||
|
||
function Config( | ||
$stateProvider, | ||
$urlMatcherFactoryProvider, | ||
$urlRouterProvider, | ||
$locationProvider) { | ||
|
||
$urlRouterProvider.otherwise('/'); | ||
$locationProvider.html5Mode(true); | ||
|
||
function valToFromString(val) { | ||
return val !== null ? val.toString() : val; | ||
} | ||
|
||
function regexpMatches(val) { // jshint validthis:true | ||
return this.pattern.test(val); | ||
} | ||
|
||
$urlMatcherFactoryProvider.type('path', { | ||
encode: valToFromString, | ||
decode: valToFromString, | ||
is: regexpMatches, | ||
pattern: /.+/ | ||
}); | ||
|
||
$stateProvider | ||
.state('root', { | ||
url: '', | ||
// abstract: true, | ||
templateUrl: 'app/root/root.html', | ||
resolve: { | ||
user: function(userService) { | ||
return userService.getUser(); | ||
} | ||
} | ||
}) | ||
.state('root.landing', { | ||
url: '/', | ||
templateUrl: 'app/landing/landing.html' | ||
}) | ||
.state('root.search', { | ||
url: '/search', | ||
templateUrl: 'app/search/search.html', | ||
controller: 'SearchCtrl', | ||
controllerAs: 'ctrl' | ||
}) | ||
.state('root.create', { | ||
url: '/create', | ||
templateUrl: 'app/create/create.html', | ||
controller: 'CreateCtrl', | ||
controllerAs: 'ctrl', | ||
resolve: { | ||
stuff: function() { | ||
return null; | ||
} | ||
} | ||
}) | ||
.state('root.view', { | ||
url: '/detail{uri:path}', | ||
params: { | ||
uri: { | ||
squash: true, | ||
value: null | ||
} | ||
}, | ||
templateUrl: 'app/detail/detail.html', | ||
controller: 'DetailCtrl', | ||
controllerAs: 'ctrl', | ||
resolve: { | ||
doc: function(MLRest, $stateParams) { | ||
var uri = $stateParams.uri; | ||
return MLRest.getDocument(uri, { format: 'json' }).then(function(response) { | ||
return response.data; | ||
}); | ||
} | ||
} | ||
}) | ||
.state('root.profile', { | ||
url: '/profile', | ||
templateUrl: 'app/user/profile.html', | ||
controller: 'ProfileCtrl', | ||
controllerAs: 'ctrl' | ||
}); | ||
} | ||
}()); |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
angular.module('sample.search', ['ml.search', 'sample.user']); | ||
angular.module('app.search', ['ml.search', 'app.user']); | ||
}()); |
Oops, something went wrong.