Skip to content

Commit a23fa1e

Browse files
committed
adicionado controller para os passos para conseguir mudar de acordo com o que for definido nas configurações
1 parent 644fa21 commit a23fa1e

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

AnalyzerQuestionsRESTful/src/main/resources/static/js/config/route-config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,19 @@ aqtApp.config(function($routeProvider, $locationProvider) {
3434

3535
}).when("/step1", {
3636
templateUrl : 'view/step-info1.html',
37+
controller : 'stepController'
3738

3839
}).when("/step2", {
3940
templateUrl : 'view/step-info2.html',
41+
controller : 'stepController'
4042

4143
}).when("/step3", {
4244
templateUrl : 'view/step-info3.html',
45+
controller : 'stepController'
4346

4447
}).when("/final", {
4548
templateUrl : 'view/final.html',
49+
controller : 'stepController'
4650

4751
}).otherwise({
4852
redirectTo : '/'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
aqtApp.controller("stepController", function($scope, aqtConfig) {
2+
3+
$scope.config = {};
4+
5+
aqtConfig.getConfig().then(function(response) {
6+
$scope.config = response.data;
7+
});
8+
});
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<main>
22
<div class="jumbotron aqt-jumbotron">
3-
<h1>Passo 1</h1>
4-
<p>Descrição do que o usuário irá fazer...</p>
3+
<h1>{{config.steps.step1.head}}</h1>
4+
<p>{{config.steps.step1.head}}</p>
55
<p><a class="btn btn-danger aqt-btn-end-time" href="#/newQuestion" role="button">PROSSEGUIR</a></p>
66
</div>
77
</main>

AnalyzerQuestionsRESTful/src/main/resources/templates/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<script src="/js/controllers/access-controller.js"></script>
5353
<script src="/js/controllers/admin-access-controller.js"></script>
5454
<script src="/js/controllers/config-controller.js"></script>
55+
<script src="/js/controllers/step-controller.js"></script>
5556

5657
<script src="/vendors/bootstrap-markdown/js/bootstrap-markdown.js"></script>
5758
<script src="/vendors/bootstrap-markdown/locale/bootstrap-markdown.ptBR.js"></script>

0 commit comments

Comments
 (0)