dependency injection in angular /factories #services

This commit is contained in:
2017-01-31 23:27:31 -08:00
parent 1c95615de6
commit 08cfc94820
4 changed files with 51 additions and 4 deletions

View File

@@ -19,7 +19,7 @@
</h3>
</div>
<!-- Hook on the controller for this view and specify when to show it using ng-hide -->
<div ng-controller = "listCtrl as list" ng-hide = "list.quizActive">
<div ng-controller = "listCtrl as list" ng-hide = "list.quizMetrics.quizActive">
<form class = "form-inline well well-sm clearfix">
<span class = "glyphicon glyphicon-search"></span>
<input type="text" placeholder ="search" class="form-control" ng-model = "list.search">
@@ -87,6 +87,11 @@
</div> <!-- modal markup ends -->
</div> <!-- container -->
<!-- quizCtrl -->
<div ng-controller = "quizCtrl as quiz" ng-show ="quiz.quizMetrics.quizActive">
<p>Work hard bro u will get it </p>
</div>
</div>
<!-- third party scripts -->
<!-- <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0-rc.2/angular.min.js"></script> -->
@@ -96,5 +101,7 @@
<!-- application scripts -->
<script src ="js/app.js"></script>
<script src ="js/controllers/list.js"></script>
<script src ="js/controllers/quiz.js"></script>
<script src ="js/factories/quizmetrics.js"></script>
</body>
</html>