Source code

Revision control

Copy as Markdown

Other Tools

webpackJsonp([1,4],{"/fcW":function(n,l){function t(n){throw new Error("Cannot find module '"+n+"'.")}t.keys=function(){return[]},t.resolve=t,n.exports=t,t.id="/fcW"},0:function(n,l,t){n.exports=t("x35b")},"1A80":function(n,l,t){"use strict";function u(n){return r._17(0,[(n()(),r._18(0,null,null,11,"li",[],[[2,"completed",null]],null,null,null,null)),(n()(),r._19(null,["\n "])),(n()(),r._18(0,null,null,8,"div",[["class","view"]],null,null,null,null,null)),(n()(),r._19(null,["\n "])),(n()(),r._18(0,null,null,0,"input",[["class","toggle"],["type","checkbox"]],[[8,"checked",0]],[[null,"click"]],function(n,l,t){var u=!0,o=n.component;if("click"===l){u=!1!==o.toggleTodoComplete(n.context.$implicit)&&u}return u},null,null)),(n()(),r._19(null,["\n "])),(n()(),r._18(0,null,null,1,"label",[],null,null,null,null,null)),(n()(),r._19(null,["",""])),(n()(),r._19(null,["\n "])),(n()(),r._18(0,null,null,0,"button",[["class","destroy"]],null,[[null,"click"]],function(n,l,t){var u=!0,o=n.component;if("click"===l){u=!1!==o.removeTodo(n.context.$implicit)&&u}return u},null,null)),(n()(),r._19(null,["\n "])),(n()(),r._19(null,["\n "]))],null,function(n,l){n(l,0,0,l.context.$implicit.complete),n(l,4,0,l.context.$implicit.complete),n(l,7,0,l.context.$implicit.title)})}function o(n){return r._17(0,[(n()(),r._18(0,null,null,7,"section",[["class","main"]],null,null,null,null,null)),(n()(),r._19(null,["\n "])),(n()(),r._18(0,null,null,4,"ul",[["class","todo-list"]],null,null,null,null,null)),(n()(),r._19(null,["\n "])),(n()(),r._20(16777216,null,null,1,null,u)),r._21(802816,null,0,c.h,[r._2,r._3,r.m],{ngForOf:[0,"ngForOf"]},null),(n()(),r._19(null,["\n "])),(n()(),r._19(null,["\n "]))],function(n,l){n(l,5,0,l.component.todos)},null)}function e(n){return r._17(0,[(n()(),r._18(0,null,null,6,"footer",[["class","footer"]],null,null,null,null,null)),(n()(),r._19(null,["\n "])),(n()(),r._18(0,null,null,3,"span",[["class","todo-count"]],null,null,null,null,null)),(n()(),r._18(0,null,null,1,"strong",[],null,null,null,null,null)),(n()(),r._19(null,["",""])),(n()(),r._19(null,[" "," left"])),(n()(),r._19(null,["\n "]))],null,function(n,l){var t=l.component;n(l,4,0,t.todos.length),n(l,5,0,1==t.todos.length?"item":"items")})}function i(n){return r._17(0,[(n()(),r._18(0,null,null,20,"section",[["class","todoapp"]],null,null,null,null,null)),(n()(),r._19(null,["\n "])),(n()(),r._18(0,null,null,11,"header",[["class","header"]],null,null,null,null,null)),(n()(),r._19(null,["\n "])),(n()(),r._18(0,null,null,1,"h1",[],null,null,null,null,null)),(n()(),r._19(null,["Todos"])),(n()(),r._19(null,["\n "])),(n()(),r._18(0,null,null,5,"input",[["autofocus",""],["class","new-todo"],["placeholder","What needs to be done?"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"keyup.enter"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(n,l,t){var u=!0,o=n.component;if("input"===l){u=!1!==r._22(n,8)._handleInput(t.target.value)&&u}if("blur"===l){u=!1!==r._22(n,8).onTouched()&&u}if("compositionstart"===l){u=!1!==r._22(n,8)._compositionStart()&&u}if("compositionend"===l){u=!1!==r._22(n,8)._compositionEnd(t.target.value)&&u}if("ngModelChange"===l){u=!1!==(o.newTodo.title=t)&&u}if("keyup.enter"===l){u=!1!==o.addTodo()&&u}return u},null,null)),r._21(16384,null,0,a.d,[r._12,r.Z,[2,a.e]],null,null),r._23(1024,null,a.f,function(n){return[n]},[a.d]),r._21(671744,null,0,a.g,[[8,null],[8,null],[8,null],[2,a.f]],{model:[0,"model"]},{update:"ngModelChange"}),r._23(2048,null,a.h,null,[a.g]),r._21(16384,null,0,a.i,[a.h],null,null),(n()(),r._19(null,["\n "])),(n()(),r._19(null,["\n "])),(n()(),r._20(16777216,null,null,1,null,o)),r._21(16384,null,0,c.i,[r._2,r._3],{ngIf:[0,"ngIf"]},null),(n()(),r._19(null,["\n "])),(n()(),r._20(16777216,null,null,1,null,e)),r._21(16384,null,0,c.i,[r._2,r._3],{ngIf:[0,"ngIf"]},null),(n()(),r._19(null,["\n"]))],function(n,l){var t=l.component;n(l,10,0,t.newTodo.title),n(l,16,0,t.todos.length>0),n(l,19,0,t.todos.length>0)},function(n,l){n(l,7,0,r._22(l,12).ngClassUntouched,r._22(l,12).ngClassTouched,r._22(l,12).ngClassPristine,r._22(l,12).ngClassDirty,r._22(l,12).ngClassValid,r._22(l,12).ngClassInvalid,r._22(l,12).ngClassPending)})}function d(n){return r._17(0,[(n()(),r._18(0,null,null,2,"app-root",[],null,null,null,i,_)),r._23(512,null,f.a,f.a,[]),r._21(49152,null,0,s.a,[f.a],null,null)],null,null)}var r=t("3j3K"),c=t("2Je8"),s=t("YWx4"),a=t("NVOs"),f=t("j3en");t.d(l,"a",function(){return g});var p=[],_=r._16({encapsulation:2,styles:p,data:{}}),g=r._24("app-root",s.a,d,{},{},[])},Iksp:function(n,l,t){"use strict";t.d(l,"a",function(){return u});var u=function(){function n(){}return n}()},YWx4:function(n,l,t){"use strict";var u=t("aKa3"),o=t("j3en");t.d(l,"a",function(){return e});var e=function(){function n(n){this.todoDataService=n,this.newTodo=new u.a}return n.prototype.addTodo=function(){this.todoDataService.addTodo(this.newTodo),this.newTodo=new u.a},n.prototype.toggleTodoComplete=function(n){this.todoDataService.toggleTodoComplete(n)},n.prototype.removeTodo=function(n){this.todoDataService.deleteTodoById(n.id)},Object.defineProperty(n.prototype,"todos",{get:function(){return this.todoDataService.getAllTodos()},enumerable:!0,configurable:!0}),n.ctorParameters=function(){return[{type:o.a}]},n}()},aKa3:function(n,l,t){"use strict";t.d(l,"a",function(){return u});var u=function(){function n(n){void 0===n&&(n={}),this.title="",this.complete=!1,Object.assign(this,n)}return n}()},j3en:function(n,l,t){"use strict";t.d(l,"a",function(){return u});var u=function(){function n(){this.lastId=0,this.todos=[]}return n.prototype.addTodo=function(n){return n.id||(n.id=++this.lastId),this.todos.push(n),this},n.prototype.deleteTodoById=function(n){return this.todos=this.todos.filter(function(l){return l.id!==n}),this},n.prototype.updateTodoById=function(n,l){void 0===l&&(l={});var t=this.getTodoById(n);return t?(Object.assign(t,l),t):null},n.prototype.getAllTodos=function(){return this.todos},n.prototype.getTodoById=function(n){return this.todos.filter(function(l){return l.id===n}).pop()},n.prototype.toggleTodoComplete=function(n){return this.updateTodoById(n.id,{complete:!n.complete})},n.ctorParameters=function(){return[]},n}()},kZql:function(n,l,t){"use strict";t.d(l,"a",function(){return u});var u={production:!0}},kke6:function(n,l,t){"use strict";var u=t("3j3K"),o=t("Iksp"),e=t("YWx4"),i=t("1A80"),d=t("2Je8"),r=t("Qbdm"),c=t("NVOs"),s=t("Fzro");t.d(l,"a",function(){return a});var a=u.b(o.a,[e.a],function(n){return u.c([u.d(512,u.e,u.f,[[8,[i.a]],[3,u.e],u.g]),u.d(5120,u.h,u.i,[[3,u.h]]),u.d(4608,d.a,d.b,[u.h]),u.d(4608,u.j,u.j,[]),u.d(5120,u.k,u.l,[]),u.d(5120,u.m,u.n,[]),u.d(5120,u.o,u.p,[]),u.d(4608,r.b,r.c,[d.c]),u.d(6144,u.q,null,[r.b]),u.d(4608,r.d,r.e,[]),u.d(5120,r.f,function(n,l,t,u){return[new r.g(n),new r.h(l),new r.i(t,u)]},[d.c,d.c,d.c,r.d]),u.d(4608,r.j,r.j,[r.f,u.r]),u.d(135680,r.k,r.k,[d.c]),u.d(4608,r.l,r.l,[r.j,r.k]),u.d(6144,u.s,null,[r.l]),u.d(6144,r.m,null,[r.k]),u.d(4608,u.t,u.t,[u.r]),u.d(4608,r.n,r.n,[d.c]),u.d(4608,r.o,r.o,[d.c]),u.d(4608,c.a,c.a,[]),u.d(4608,s.a,s.a,[]),u.d(4608,s.b,s.c,[]),u.d(5120,s.d,s.e,[]),u.d(4608,s.f,s.f,[s.a,s.b,s.d]),u.d(4608,s.g,s.h,[]),u.d(5120,s.i,s.j,[s.f,s.g]),u.d(512,d.d,d.d,[]),u.d(1024,u.u,r.p,[]),u.d(1024,u.v,function(n,l){return[r.q(n,l)]},[[2,r.r],[2,u.w]]),u.d(512,u.x,u.x,[[2,u.v]]),u.d(131584,u.y,u.y,[u.r,u.z,u.A,u.u,u.e,u.x]),u.d(2048,u.B,null,[u.y]),u.d(512,u.C,u.C,[u.B]),u.d(512,r.s,r.s,[[3,r.s]]),u.d(512,c.b,c.b,[]),u.d(512,c.c,c.c,[]),u.d(512,s.k,s.k,[]),u.d(512,o.a,o.a,[])])})},x35b:function(n,l,t){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var u=t("3j3K"),o=t("kZql"),e=t("Qbdm"),i=t("kke6");o.a.production&&t.i(u.a)(),t.i(e.a)().bootstrapModuleFactory(i.a)}},[0]);