In any component-based framework you’ll need to implement component
communications. The main principle is that components should be loosely
coupled hence reusable hence testable. The mediator design pattern allows you
to arrange component communications via “the man in the middle” so a
component A never communicates with the component B directly. If a component
needs data, someone will provide the data via bindings to the component’s
input properties. Who’s this someone?Ain’t no business of the component.
If a component needs to provide some data to the external world, it’ll emit
events (with the data payload). Emits to whom? Ain’t no business of the
component. Let whoever needs the data listen to the events from this
The mediator pattern is one of the ways to arrange a loosely coupled
communication between components. In the following video I show an ex... (more)
In the previous blog I did a high-level overview of Angular 2 router and
wrote a basic routing application that demonstrated displaying different
components in a predefined area of the window. We often need not only display
a component, but also pass some data to it.
For example, if we navigate from the Home to the Product Detail route we need
to pass the product ID to the destination route. Angular offers a directive
RouteParams so a route can receive data from the parent component. There is
also a RouteData directive that can be used to pass additional data to a
route from the... (more)
In Angular 2 a parent component can pass the data to its child via binding to
the child’s input parameter marked with the annotation @Input(). I’ll
blog about it later, but you can see how it can be done in my blog on
implementing the Mediator design pattern.
In this blog I’ll show you another scenario when the parent component
simply needs to use the API exposed by the child. You’ll see how a parent
component can use the child’s API from both the template and the TypeScript
Let’s create a simple application where a child component has the method
greet() that will be invo... (more)
This article was excerpted from the book “Angular Development With
TypeScript” (see http://bit.ly/1QYeqL0).
The Angular 2 framework is a re-write of popular framework AngularJS. In
short, the newer version has the following advantages over AngularJS.
The code is simpler to write and read It performs better than AngularJS
It’s easier to learn The application architecture is simplified as it’s
This article contains a high-level overview of Angular highlighting
improvements comparing to AngularJS. For a more detailed architecture
overview of Angular visit product do... (more)
During the last several years Oracle was working on their cloud solution, and
libraries used internally, and they also developed a set of reusable Web UI
components both simple (e.g., buttons and forms) as well as complex (data
grids, charts, accordion, and fancy gauges). All these components are based
on jQuery UI and are responsive, so they can be used on mobile devices.
Having a nice set of UI components is great, but is not en... (more)