Looking at the above graph, It’s good that I am keeping the goal of spending 3 hours purely on coding. Well my tracker doesn’t track the time that is spend on debugging/researching a particular problem.
For this week I switched back to the Ionic. Which is also build on top of Angular. As angular has a choice to use JavaScript but I am using Typescript that’s why Typescript has 41.34% of the pie chart. Half of the coding is through HTML which is because angular allows us to link separate template file. I tend to write html inline when it’s small. It does feels organized when everything is written in one component.ts file. I am not in favor of writing separate css for each component because it’s injected as embedded css when compiled. Where is the concept of separation of concerns when css is injected in the body of html.
Things Learned
Access Modifiers in Constructor Function
In Angular 2* we use a typescript convention known as constructor assignment. In order to use a service or library, we need pass a reference to library as a parameter in our constructor. We need to inject the service in the constructor. Without providing any access modifier, the reference will be function scoped limited to that of constructor function.

If you provide the access modifier while passing parameters than the parameter will be class scoped i-e will be considered the member of the class.

Things Discovered
- There is no way to remove grey border around broken image in webkit. The only way to fix it, is to hide the broken image entirely as
img:not([src]){ display:none; visibility: hidden; }
- We can style the broken image with the way we want using Pseudo Elements. You can add custom message or custom placeholder image.
- In fact all the class members are public unless they are specified public.
Conclusion
That’s all I have to share from this week of my work log. I hope you have learned a thing or two. I would like to know how you have spend you last work week.