Created
September 29, 2015 16:45
-
-
Save byronferguson/e091fe67dbf34b6b37c5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
'use strict'; | |
angular.module('app.student').controller('ccRecommendationsCtrl', function () { | |
this.showClusters = function() { | |
return this.recommendations.length; | |
}; | |
this.showDisciplines = function(cluster) { | |
return cluster.disciplines.length; | |
} | |
}); |
This file contains hidden or 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
'use strict'; | |
angular.module('app.student').directive('ccRecommendations', function ($compile) { | |
return { | |
replace: true, | |
restrict: 'E', | |
scope: { | |
recommendations: '=' | |
}, | |
templateUrl: 'app/student/directives/ccRecommendations/ccRecommendations.tpl.html', | |
bindToController: true, | |
controllerAs: 'ccRecommendationsCtrl', | |
controller: 'ccRecommendationsCtrl' | |
}; | |
}); |
This file contains hidden or 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
<div> | |
<ol ng-show="ccRecommendationsCtrl.recommendations.length"> | |
<li ng-repeat="cluster in ccRecommendationsCtrl.recommendations.clusters"> | |
{{cluster.title}} | |
<ol ng-show="ccRecommendationsCtrl.showDisciplines(cluster)"> | |
<li ng-repeat="discipline in cluster.disciplines">{{discipline.title}}</li> | |
</ol> | |
<ul class="list list-unstyled" ng-hide="ccRecommendationsCtrl.showDisciplines(cluster)"> | |
<li><i class="fa fa-sm fa-warning txt-color-red"></i> Cluster Interview Incomplete</li> | |
</ul> | |
</li> | |
</ol> | |
<ul class="list list-unstyled" ng-hide="ccRecommendationsCtrl.showClusters"> | |
<li><i class="fa fa-sm fa-warning txt-color-red"></i> Primary Interview Incomplete</li> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment