two examples of implementing react components
This commit is contained in:
parent
67e466ee11
commit
36b1ee2be9
3 changed files with 26 additions and 19 deletions
|
@ -2,19 +2,18 @@
|
|||
/**
|
||||
* Repository view page.
|
||||
*/
|
||||
angular.module('quayPages')
|
||||
.config(['pages', function(pages) {
|
||||
pages.create('repo-view', 'repo-view.html', RepoViewCtrl, {
|
||||
'newLayout': true,
|
||||
'title': '{{ namespace }}/{{ name }}',
|
||||
'description': 'Repository {{ namespace }}/{{ name }}'
|
||||
});
|
||||
}])
|
||||
angular.module('quayPages').config(['pages', function(pages) {
|
||||
pages.create('repo-view', 'repo-view.html', RepoViewCtrl, {
|
||||
'newLayout': true,
|
||||
'title': '{{ namespace }}/{{ name }}',
|
||||
'description': 'Repository {{ namespace }}/{{ name }}'
|
||||
});
|
||||
}]);
|
||||
|
||||
function RepoViewCtrl($scope, $routeParams, $location, $timeout, ApiService, UserService, AngularPollChannel, ImageLoaderService, CookieService) {
|
||||
$scope.reactProps = {
|
||||
prop1: 'Prop 1',
|
||||
prop2: 'Prop 2'
|
||||
firstProp: 'Prop 1',
|
||||
secondProp: 'Prop 2'
|
||||
};
|
||||
|
||||
$scope.namespace = $routeParams.namespace;
|
||||
|
|
Reference in a new issue