Created
October 8, 2015 19:00
-
-
Save byronferguson/5ff40c83fb74ed8bb95f to your computer and use it in GitHub Desktop.
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
'use strict'; | |
angular.module('app.interview').controller('interviewCtrl', function ($scope, $stateParams, $modal) { | |
var vm = this; | |
vm.tooltip = '<h1>interviewPageTooltip <code>HTML</code></h1>'; | |
vm.open = function () { | |
var modelInstance = $modal.open({ | |
animation: true, | |
template: '<div class="modal-header"><h3 class="modal-title">Special Directions</h3></div><div class="modal-body">{{tooltip}}</div><div class="modal-footer"><button class="btn btn-primary" type="button" ng-click="ok()">OK</button><button class="btn btn-warning" type="button" ng-click="cancel()">Cancel</button></div>', | |
controller: 'modalInstanceCtrl', | |
resolve: { | |
tooltip: function() { | |
return vm.tooltip; | |
} | |
} | |
}); | |
}; | |
if(vm.tooltip.length) { | |
vm.open(); | |
} | |
}) | |
.controller('modalInstanceCtrl', function ($scope, $modalInstance, tooltip) { | |
$scope.tooltip = tooltip; | |
$scope.ok = function () { | |
$modalInstance.close(); | |
}; | |
$scope.cancel = function () { | |
$modalInstance.dismiss('cancel'); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment