(window.webpackJsonp=window.webpackJsonp||[]).push([[277],{cJYw:function(e,t,n){"use strict";n.r(t),n.d(t,"SamplePageModule",(function(){return I}));var a=n("ofXK"),o=n("5W9+");class r extends o.a.AbstractLoadingState{}class i extends o.a.AbstractIdealState{}var d=n("fXoL"),s=n("XNiG");const c={id:24234234,cars:[]};let l=(()=>{class e extends o.a.AbstractService{load(e){const t=new s.b;return setTimeout(()=>{t.next(new r)},0),setTimeout(()=>{t.next(new i(c)),t.complete()},2e3),t}}return e.\u0275fac=function(t){return p(t||e)},e.\u0275prov=d["\u0275\u0275defineInjectable"]({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const p=d["\u0275\u0275getInheritedFactory"](l);function f(e,t){1&e&&(d["\u0275\u0275elementStart"](0,"div"),d["\u0275\u0275text"](1,"No Data"),d["\u0275\u0275elementEnd"]())}function m(e,t){1&e&&(d["\u0275\u0275elementStart"](0,"div"),d["\u0275\u0275text"](1,"Something went wrong"),d["\u0275\u0275elementEnd"]())}function u(e,t){1&e&&(d["\u0275\u0275elementStart"](0,"div"),d["\u0275\u0275text"](1,"Loading please wait!"),d["\u0275\u0275elementEnd"]())}function g(e,t){if(1&e&&(d["\u0275\u0275elementStart"](0,"div"),d["\u0275\u0275elementStart"](1,"div",1),d["\u0275\u0275text"](2),d["\u0275\u0275elementEnd"](),d["\u0275\u0275elementEnd"]()),2&e){const e=d["\u0275\u0275nextContext"]();d["\u0275\u0275advance"](2),d["\u0275\u0275textInterpolate1"](" ",e.data.id," ")}}let v=(()=>{class e{constructor(e){this.samplePageService=e}ngOnInit(){this.load(null)}load(e){const t=this;t.samplePageService.load(e).subscribe(e=>{e instanceof r?t.onLoading(e):e instanceof i&&t.onLoaded(e)},e=>{t.onLoadingError(e)})}onLoading(e){this.error=null,this.loading=!0}onLoadingError(e){this.data=null,this.error=e.error,this.loading=!1}onLoaded(e){this.data=e.data,this.error=null,this.loading=!1}}return e.\u0275fac=function(t){return new(t||e)(d["\u0275\u0275directiveInject"](l))},e.\u0275cmp=d["\u0275\u0275defineComponent"]({type:e,selectors:[["app-sample-page"]],decls:4,vars:4,consts:[[4,"ngIf"],[1,"id"]],template:function(e,t){1&e&&(d["\u0275\u0275template"](0,f,2,0,"div",0),d["\u0275\u0275template"](1,m,2,0,"div",0),d["\u0275\u0275template"](2,u,2,0,"div",0),d["\u0275\u0275template"](3,g,3,1,"div",0)),2&e&&(d["\u0275\u0275property"]("ngIf",t.empty),d["\u0275\u0275advance"](1),d["\u0275\u0275property"]("ngIf",t.error),d["\u0275\u0275advance"](1),d["\u0275\u0275property"]("ngIf",t.loading),d["\u0275\u0275advance"](1),d["\u0275\u0275property"]("ngIf",t.data&&!t.loading))},directives:[a.t],styles:["app-sample-page .id{font-size:35px;color:#adff2f}"],encapsulation:2}),e})();var h=n("tyNb");const w=[a.c],x=[{path:"sample-page",component:v}];let I=(()=>{class e{}return e.\u0275mod=d["\u0275\u0275defineNgModule"]({type:e}),e.\u0275inj=d["\u0275\u0275defineInjector"]({factory:function(t){return new(t||e)},imports:[[w,h.m.forChild(x)],h.m]}),e})()}}]);