Tuesday, May 17, 2016

Angular attack 2016 hackathon review



It was a first experience of an online hackathon for me. On the one hand with doing hackathon online you don't have that close interaction with other participants, looking at each other's screens, having fast-food-and-beer dinner together and don't feel this unity of people involved, gathered in one place to achieve something.
However, on the other hand that makes your team more flexible in time and work planning during a weekend time. It also helps to gather an order of magnitude more participants across the globe.

Please find my view on the passed Angular Attack 2016 below:

Thursday, May 12, 2016

Pipes in Angular2

Pipes are Angular 1.x filter being rethink. Pipes can be defined with special decorator @Pipe.
This entity can accept a value plus additional options parameters and return a transformed result.
By default you have available: DatePipe, UpperCasePipe, LowerCasePipe, CurrencyPipe, and PercentPipe;


Monday, May 9, 2016

Google Chrome extension development tips

1) Get manifest.json properties of running chrome extension
chrome.runtime.getManifest() 

2) Integrate live google search in google chrome extension

Sample code below, supposingly using jQuery.UI widget with <input id="googleSearch">:

$("#googleSearch").autocomplete({
   source: function(request, response) { 
    $.ajax({ url: "https://suggestqueries.google.com/complete/search?client=chrome&q=",
  dataType: "jsonp",
  data: { q: request.term },
  success: function(data) { response(data[2].splice(0, 15)); } }); },
  minLength: 1,
  select: function(event, ui) { 
   var value = ui.item.label;
   if (ui.item.label.indexOf("http://") === -1 &&      ui.item.label.indexOf("https://") === -1)
  { 
   value = "http://google.com/search?q=" + value }
   document.location = value; 
 }
});

Catchups on Angular2 and TypeScript


How to define arrays in the interface and class properties in TypeScript
How-to's on using services, router and templates in Angular2

and many more coming...