I am facing a challenge with this specific instruction.
angular.module('starter.directive', [])
.directive('answer', ['Helper', function (Helper) {
return {
require: "logic",
link: function (scope, element, attrs, logicCtrl) {
var htm = '';
if(logicCtrl.test == 'a') {
htm = '<p>a</p>'
}
if(logicCtrl.test == 'b') {
htm = '<p>b</p>'
}
},
template: '' // trying to figure out how to incorporate htm here
}
}]);
I'm attempting to utilize the htm
variable as part of the template
,
Any suggestions or advice?