Skip to content

Instantly share code, notes, and snippets.

@tmamedbekov
Last active June 23, 2017 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmamedbekov/2c711f1eafbb8870b640327f5b9ec31e to your computer and use it in GitHub Desktop.
Save tmamedbekov/2c711f1eafbb8870b640327f5b9ec31e to your computer and use it in GitHub Desktop.
angular.module('sc.sample', [
'ngSanitize'
]).directive('sampleComponent', function () {
return {
scope: {
data: '=sampleComponent'
},
templateUrl: `[template path]/index.html`
};
}).controller('SampleDemoController', ['$scope', function ($scope) {
$scope.data = {
Title: 'Title',
Text: 'Text',
Image: '<img src="">'
};
}]).filter('asTrusted', ['$sce', function ($sce) {
return function (text) {
return $sce.trustAsHtml(text);
};
}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment