diff --git a/bundles/ng2-toasty.js b/bundles/ng2-toasty.js
index 07d686f..c0df263 100644
--- a/bundles/ng2-toasty.js
+++ b/bundles/ng2-toasty.js
@@ -99,7 +99,7 @@ System.registerDynamic("src/toasty.container", ["angular2/core", "angular2/commo
selector: 'ng2-toasty',
encapsulation: core_1.ViewEncapsulation.None,
directives: [common_1.CORE_DIRECTIVES, toasty_component_1.Toast],
- template: "\n
\n \n
"
+ template: "\n \n \n
"
}), __metadata('design:paramtypes', [toasty_config_1.ToastyConfig, toasty_service_1.ToastyService])], Toasty);
return Toasty;
})();
diff --git a/bundles/ng2-toasty.min.js b/bundles/ng2-toasty.min.js
index bde7d6e..2742ba0 100644
--- a/bundles/ng2-toasty.min.js
+++ b/bundles/ng2-toasty.min.js
@@ -1,2 +1,2 @@
-System.registerDynamic("src/toasty.container",["angular2/core","angular2/common","angular2/src/facade/lang","./toasty.config","./toasty.service","./toasty.component"],!0,function(t,e,o){var n=this,s=n.define;n.define=void 0;var i=this&&this.__decorate||function(t,e,o,n){var s,i=arguments.length,a=3>i?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(3>i?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},a=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},r=t("angular2/core"),c=t("angular2/common"),f=t("angular2/src/facade/lang"),l=t("./toasty.config"),u=t("./toasty.service"),p=t("./toasty.component"),d=function(){function t(t,e){this.config=t,this.toastyService=e,this.toasts=[]}return t.prototype.ngOnInit=function(){var e=this;if(this.toastyService.getToasts().subscribe(function(t){e.toasts.length>=e.config.limit&&e.toasts.shift(),e.toasts.push(t),t.timeout&&e._setTimeout(t)}),this.toastyService.getClear().subscribe(function(){e.clearAll()}),this.position){for(var o=!0,n=0;n\n \n '}),a("design:paramtypes",[l.ToastyConfig,u.ToastyService])],t)}();return e.Toasty=d,n.define=s,o.exports}),System.registerDynamic("src/toasty.component",["angular2/core","angular2/common"],!0,function(t,e,o){var n=this,s=n.define;n.define=void 0;var i=this&&this.__decorate||function(t,e,o,n){var s,i=arguments.length,a=3>i?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(3>i?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},a=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},r=t("angular2/core"),c=t("angular2/common"),f=function(){function t(){this.closeToastEvent=new r.EventEmitter}return t.prototype.close=function(t){t.preventDefault(),this.closeToastEvent.next(this.toast)},i([r.Input(),a("design:type",Object)],t.prototype,"toast",void 0),i([r.Output("closeToast"),a("design:type",Object)],t.prototype,"closeToastEvent",void 0),t=i([r.Component({selector:"ng2-toast",directives:[c.CORE_DIRECTIVES],template:'\n \n
\n
\n {{toast.title}}\n
\n {{toast.msg}}\n
\n
'}),a("design:paramtypes",[])],t)}();return e.Toast=f,n.define=s,o.exports}),System.registerDynamic("src/toasty.config",["angular2/core"],!0,function(t,e,o){var n=this,s=n.define;n.define=void 0;var i=this&&this.__decorate||function(t,e,o,n){var s,i=arguments.length,a=3>i?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(3>i?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},a=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},r=t("angular2/core"),c=function(){function t(){this.limit=5,this.showClose=!0,this.position="bottom-right",this.timeout=5e3,this.theme="default"}return t=i([r.Injectable(),a("design:paramtypes",[])],t)}();return e.ToastyConfig=c,n.define=s,o.exports}),System.registerDynamic("src/toasty.service",["angular2/core","angular2/src/facade/lang","rxjs/Observable","./toasty.config"],!0,function(t,e,o){var n=this,s=n.define;n.define=void 0;var i=this&&this.__decorate||function(t,e,o,n){var s,i=arguments.length,a=3>i?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(3>i?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},a=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},r=t("angular2/core"),c=t("angular2/src/facade/lang"),f=t("rxjs/Observable"),l=t("./toasty.config"),u=function(){function t(t){var e=this;this.config=t,this.uniqueCounter=0,this.toastsObservable=new f.Observable(function(t){e.toastsSubscriber=t}),this.clearObservable=new f.Observable(function(t){e.clearSubscriber=t})}return t.prototype.getToasts=function(){return this.toastsObservable},t.prototype.getClear=function(){return this.clearObservable},t.prototype["default"]=function(t){this.add(t,"default")},t.prototype.info=function(t){this.add(t,"info")},t.prototype.success=function(t){this.add(t,"success")},t.prototype.wait=function(t){this.add(t,"wait")},t.prototype.error=function(t){this.add(t,"error")},t.prototype.warning=function(t){this.add(t,"warning")},t.prototype.add=function(e,o){var n;if(n=c.isString(e)&&""!==e||c.isNumber(e)?{title:e.toString()}:e,!n||!n.title&&!n.msg)throw new Error("ng2-toasty: No toast title or message specified!");o=o||"default",this.uniqueCounter++;var s,i=this._checkConfigItem(this.config,n,"showClose");s=n.theme&&t.THEMES.indexOf(n.theme)>-1?n.theme:this.config.theme;var a={id:this.uniqueCounter,title:n.title,msg:n.msg,showClose:i,type:"toasty-type-"+o,theme:"toasty-theme-"+s,onAdd:n.onAdd&&c.isFunction(n.onAdd)?n.onAdd:null,onRemove:n.onRemove&&c.isFunction(n.onRemove)?n.onRemove:null};n.timeout?a.timeout=n.timeout||this.config.timeout:a.timeout=null;try{this.toastsSubscriber.next(a),n.onAdd&&c.isFunction(n.onAdd)&&n.onAdd.call(this,a)}catch(r){console.log(r),console.log("!!! Suggestion: Seems you forget add into your html?")}},t.prototype.clearAll=function(){this.clearSubscriber.next()},t.prototype._checkConfigItem=function(t,e,o){return e[o]===!1?!1:e[o]?!0:t[o]},t.THEMES=["default","material","bootstrap"],t=i([r.Injectable(),a("design:paramtypes",[l.ToastyConfig])],t)}();return e.ToastyService=u,n.define=s,o.exports}),System.registerDynamic("ng2-toasty",["./src/toasty.container","./src/toasty.component","./src/toasty.config","./src/toasty.service"],!0,function(t,e,o){"use strict";function n(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}var s=this,i=s.define;s.define=void 0;var a=t("./src/toasty.container"),r=t("./src/toasty.component"),c=t("./src/toasty.config"),f=t("./src/toasty.service");return n(t("./src/toasty.container")),n(t("./src/toasty.component")),n(t("./src/toasty.config")),n(t("./src/toasty.service")),Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={providers:[c.ToastyConfig,f.ToastyService],directives:[a.Toasty,r.Toast]},s.define=i,o.exports});
+System.registerDynamic("src/toasty.container",["angular2/core","angular2/common","angular2/src/facade/lang","./toasty.config","./toasty.service","./toasty.component"],!0,function(t,e,o){var n=this,s=n.define;n.define=void 0;var i=this&&this.__decorate||function(t,e,o,n){var s,i=arguments.length,a=3>i?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(3>i?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},a=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},r=t("angular2/core"),c=t("angular2/common"),f=t("angular2/src/facade/lang"),l=t("./toasty.config"),u=t("./toasty.service"),p=t("./toasty.component"),d=function(){function t(t,e){this.config=t,this.toastyService=e,this.toasts=[]}return t.prototype.ngOnInit=function(){var e=this;if(this.toastyService.getToasts().subscribe(function(t){e.toasts.length>=e.config.limit&&e.toasts.shift(),e.toasts.push(t),t.timeout&&e._setTimeout(t)}),this.toastyService.getClear().subscribe(function(){e.clearAll()}),this.position){for(var o=!0,n=0;n\n \n '}),a("design:paramtypes",[l.ToastyConfig,u.ToastyService])],t)}();return e.Toasty=d,n.define=s,o.exports}),System.registerDynamic("src/toasty.component",["angular2/core","angular2/common"],!0,function(t,e,o){var n=this,s=n.define;n.define=void 0;var i=this&&this.__decorate||function(t,e,o,n){var s,i=arguments.length,a=3>i?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(3>i?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},a=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},r=t("angular2/core"),c=t("angular2/common"),f=function(){function t(){this.closeToastEvent=new r.EventEmitter}return t.prototype.close=function(t){t.preventDefault(),this.closeToastEvent.next(this.toast)},i([r.Input(),a("design:type",Object)],t.prototype,"toast",void 0),i([r.Output("closeToast"),a("design:type",Object)],t.prototype,"closeToastEvent",void 0),t=i([r.Component({selector:"ng2-toast",directives:[c.CORE_DIRECTIVES],template:'\n \n
\n
\n {{toast.title}}\n
\n {{toast.msg}}\n
\n
'}),a("design:paramtypes",[])],t)}();return e.Toast=f,n.define=s,o.exports}),System.registerDynamic("src/toasty.config",["angular2/core"],!0,function(t,e,o){var n=this,s=n.define;n.define=void 0;var i=this&&this.__decorate||function(t,e,o,n){var s,i=arguments.length,a=3>i?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(3>i?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},a=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},r=t("angular2/core"),c=function(){function t(){this.limit=5,this.showClose=!0,this.position="bottom-right",this.timeout=5e3,this.theme="default"}return t=i([r.Injectable(),a("design:paramtypes",[])],t)}();return e.ToastyConfig=c,n.define=s,o.exports}),System.registerDynamic("src/toasty.service",["angular2/core","angular2/src/facade/lang","rxjs/Observable","./toasty.config"],!0,function(t,e,o){var n=this,s=n.define;n.define=void 0;var i=this&&this.__decorate||function(t,e,o,n){var s,i=arguments.length,a=3>i?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(3>i?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},a=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},r=t("angular2/core"),c=t("angular2/src/facade/lang"),f=t("rxjs/Observable"),l=t("./toasty.config"),u=function(){function t(t){var e=this;this.config=t,this.uniqueCounter=0,this.toastsObservable=new f.Observable(function(t){e.toastsSubscriber=t}),this.clearObservable=new f.Observable(function(t){e.clearSubscriber=t})}return t.prototype.getToasts=function(){return this.toastsObservable},t.prototype.getClear=function(){return this.clearObservable},t.prototype["default"]=function(t){this.add(t,"default")},t.prototype.info=function(t){this.add(t,"info")},t.prototype.success=function(t){this.add(t,"success")},t.prototype.wait=function(t){this.add(t,"wait")},t.prototype.error=function(t){this.add(t,"error")},t.prototype.warning=function(t){this.add(t,"warning")},t.prototype.add=function(e,o){var n;if(n=c.isString(e)&&""!==e||c.isNumber(e)?{title:e.toString()}:e,!n||!n.title&&!n.msg)throw new Error("ng2-toasty: No toast title or message specified!");o=o||"default",this.uniqueCounter++;var s,i=this._checkConfigItem(this.config,n,"showClose");s=n.theme&&t.THEMES.indexOf(n.theme)>-1?n.theme:this.config.theme;var a={id:this.uniqueCounter,title:n.title,msg:n.msg,showClose:i,type:"toasty-type-"+o,theme:"toasty-theme-"+s,onAdd:n.onAdd&&c.isFunction(n.onAdd)?n.onAdd:null,onRemove:n.onRemove&&c.isFunction(n.onRemove)?n.onRemove:null};n.timeout?a.timeout=n.timeout||this.config.timeout:a.timeout=null;try{this.toastsSubscriber.next(a),n.onAdd&&c.isFunction(n.onAdd)&&n.onAdd.call(this,a)}catch(r){console.log(r),console.log("!!! Suggestion: Seems you forget add into your html?")}},t.prototype.clearAll=function(){this.clearSubscriber.next()},t.prototype._checkConfigItem=function(t,e,o){return e[o]===!1?!1:e[o]?!0:t[o]},t.THEMES=["default","material","bootstrap"],t=i([r.Injectable(),a("design:paramtypes",[l.ToastyConfig])],t)}();return e.ToastyService=u,n.define=s,o.exports}),System.registerDynamic("ng2-toasty",["./src/toasty.container","./src/toasty.component","./src/toasty.config","./src/toasty.service"],!0,function(t,e,o){"use strict";function n(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}var s=this,i=s.define;s.define=void 0;var a=t("./src/toasty.container"),r=t("./src/toasty.component"),c=t("./src/toasty.config"),f=t("./src/toasty.service");return n(t("./src/toasty.container")),n(t("./src/toasty.component")),n(t("./src/toasty.config")),n(t("./src/toasty.service")),Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={providers:[c.ToastyConfig,f.ToastyService],directives:[a.Toasty,r.Toast]},s.define=i,o.exports});
//# sourceMappingURL=bundles/ng2-toasty.min.js.map
\ No newline at end of file
diff --git a/package.json b/package.json
index f91dafc..b4856c6 100644
--- a/package.json
+++ b/package.json
@@ -27,12 +27,12 @@
"typings": "./ng2-toasty.d.ts",
"homepage": "https://github.com/akserg/ng2-toasty",
"devDependencies": {
- "angular2": "~2.0.0-beta.14",
+ "angular2": "~2.0.0-beta.17",
"es6-promise": "~3.1.2",
"es6-shim": "~0.35.0",
"reflect-metadata": "0.1.2",
- "rxjs": "5.0.0-beta.2",
- "zone.js": "~0.6.6",
+ "rxjs": "5.0.0-beta.6",
+ "zone.js": "~0.6.12",
"cz-conventional-changelog": "^1.1.5",
"jasmine-core": "~2.3.4",
"karma": "~0.13.15",
diff --git a/src/toasty.container.ts b/src/toasty.container.ts
index 640ea2e..aa1d946 100644
--- a/src/toasty.container.ts
+++ b/src/toasty.container.ts
@@ -21,7 +21,7 @@ import {Toast} from './toasty.component';
directives: [CORE_DIRECTIVES, Toast],
template: `
-
+
`
})
export class Toasty implements OnInit {
diff --git a/tests/toasty.component.spec.ts b/tests/toasty.component.spec.ts
index 83511d2..db93ec8 100644
--- a/tests/toasty.component.spec.ts
+++ b/tests/toasty.component.spec.ts
@@ -4,7 +4,8 @@ import {
beforeEach,
it,
inject,
- injectAsync,
+ //injectAsync,
+ async,
beforeEachProviders,
TestComponentBuilder,
ComponentFixture,
@@ -43,7 +44,7 @@ export function main() {
});
- beforeEach(injectAsync([TestComponentBuilder], (tcb:TestComponentBuilder) => {
+ beforeEach(inject([TestComponentBuilder], (tcb:TestComponentBuilder) => {
return tcb.createAsync(Toast).then((cf:ComponentFixture) => {
componentFixture = cf;
componentFixture.componentInstance.toast = toast;
@@ -52,7 +53,7 @@ export function main() {
}));
it('should be defined', () => {
- const element = componentFixture.nativeElement;
+ const element = componentFixture.elementRef.nativeElement;
expect(element.querySelector('.toast')).toBeDefined();
});
diff --git a/tests/toasty.container.spec.ts b/tests/toasty.container.spec.ts
index 9e38f91..a6b2eb8 100644
--- a/tests/toasty.container.spec.ts
+++ b/tests/toasty.container.spec.ts
@@ -4,7 +4,7 @@ import {
beforeEach,
it,
inject,
- injectAsync,
+ //injectAsync,
beforeEachProviders,
TestComponentBuilder,
ComponentFixture,
@@ -58,14 +58,15 @@ export function main() {
return [TEST_BROWSER_PLATFORM_PROVIDERS, TEST_BROWSER_APPLICATION_PROVIDERS, TestComponentBuilder, ToastyService, ToastyConfig];
});
- beforeEach(injectAsync([TestComponentBuilder, ToastyService, ToastyConfig], (tcb:TestComponentBuilder) => {
+ // beforeEach(injectAsync([TestComponentBuilder, ToastyService, ToastyConfig], (tcb:TestComponentBuilder) => {
+ beforeEach(inject([TestComponentBuilder, ToastyService, ToastyConfig], (tcb:TestComponentBuilder) => {
return tcb.createAsync(Toasty).then((cf:ComponentFixture) => {
componentFixture = cf;
});
}));
it('should be defined', () => {
- const element = componentFixture.nativeElement;
+ const element = componentFixture.elementRef.nativeElement;
expect(element.querySelector('#toasty')).toBeDefined();
});