I have this code: http://jsbin.com/gazajunacu/1/edit?html,js,output
angular.module('app', [])
.service('greeting', function Greeting() {
var greeting = this;
greeting.message = '<strong>Default 2</strong>';
})
.controller('FirstCtrl', function ($sce, greeting) {
var first = this;
first.greeting = $sce.trustAsHtml(greeting);
})
.controller('SecondCtrl', function (greeting) {
var second = this;
second.greeting = greeting;
})
And I cannot get it to spit html for first controller. I cannot get it working. Please check what's missing from the scripts.
Thanks.