window.angular && (function(angular) { 'use strict'; /** * alertBanner Component */ /** * alertBanner Component controller */ const controller = function() { this.status; this.$onInit = () => { switch (this.type) { case 'warn': case 'error': this.status = this.type; break; case 'success': this.status = 'on'; break; default: } }; }; /** * alertBanner Component template */ const template = `
` /** * Register alertBanner component */ angular.module('app.common.components').component('alertBanner', { template, controller, bindings: { type: '@', // string 'info', 'warn', 'error' or 'success' bannerText: '<' // string, can include valid HTML } }) })(window.angular);