This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-ng-if="messages.debugMessage" class="alert alert-info"> | |
<h3>Debug</h3> | |
<p>{{messages.debugMessage}}</p> | |
<pre data-ng-if="messages.debugData"><span data-ng-bind="messages.debugData | json"></span></pre> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-ng-if="messages.infoMessage" class="alert alert-info"> | |
<h3>Info</h3> | |
<p>{{messages.infoMessage}}</p> | |
</div> | |
<div data-ng-if="messages.warnMessage" class="alert alert-warning"> | |
<h3>Warning</h3> | |
<p>{{messages.warnMessage}}</p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('idleworx-message-service') | |
.controller('ControllerDemo',['$scope','MessageService',function($scope,MessageService){ | |
MessageService.init($scope); //1st thing inside a controller, call the init() method | |
/* | |
Then anywhere inside your controller you need to write a message use the message service methods. | |
Don't forget to pass in the current scope. | |
*/ |
NewerOlder