NgConf
EmberConf
angular.module('emberconf', [])
.directive('jpAlertMsg', function() {
return {
restrict: 'E',
template: 'Directive Example'
};
});
<body ng-app="emberconf">
</body>
angular.module('emberconf', [])
.directive('jpAlertMsg', function() {
return {
restrict: 'C',
template: 'Directive Example'
};
});
<body ng-app="emberconf">
<div class="jpAlertMsg"></div>
</body>
angular.module('emberconf', [])
.directive('jpAlertMsg', function() {
return {
restrict: 'C',
transclude: true,
compile: function() {
// stuff here
},
scope: {
title: '&'
name: '=',
subTitle: '@',
}
template: '<div class='alert' ng-transclude></div>'
};
});
<body ng-app="emberconf">
<div class="jpAlertMsg" sub-title="test">Directive Example</div>
</body>
===
EmberConf