Skip to content

Instantly share code, notes, and snippets.

@cpoDesign
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save cpoDesign/201ac91b1e76d9b436a4 to your computer and use it in GitHub Desktop.

Select an option

Save cpoDesign/201ac91b1e76d9b436a4 to your computer and use it in GitHub Desktop.
Original implementation of directive message, contains only error message
.directive("notificationBar", function () {
return {
transclude: false,
require: '^ngModel',
templateUrl: 'notificationBar/template.html',
scope: {
displayMessage: '@'
},
controller: function ($scope){
$scope.showMessage = function() {
return $scope.displayMessage.length > 0;
}
}
}
});
<div ng-show="showMessage()" class="Response Error">
<i class="icon-remove"></i> <span class="i-name">{{displayMessage}}</span>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment