Before the release of Angular.io, React, Vue, the most used framework for SPA was without any doubt Angulajs. We used it for small and large applications, because of its modularity that help us to organize the code in different logic modules. But now with the release of new frameworks, we have some questions: how I... Continue Reading →
Upgrade an Angular 2 application to Angular 4
One years ago I wrote a series of posts about Angular 2 and how we can develop a base application with this new framework. The time is gone and during this period many releases came; the last Angular 4 version is 4.4.6 and a new stable version of the framework has been released in version... Continue Reading →
Consume Web API OData with ODataAngularResources
One month ago, I wrote this post about the odata services and how we can consume those with the $http factory of Angularjs. This approach is not wrong but is not smart at all, because we have to write every query for any call that the application needs to do, and is not flexible. What... Continue Reading →
Consume Web API with an Angularjs service
This topic concerns a problem that I faced in these days, that was the building of an Angularjs service to consume Web API's, witch in my case were implemented with OData protocol. The start point are some Web API's, one for every entity of the project, that they responds to a specific url, for example:... Continue Reading →
Webpack with Angular2
In a previous post I spoke about the configurations to manage bundles in angular 2 with Systemjs. For this purphose, the latest versions of Angular CLI uses webpack and we can use it as module bundler in the new angular 2/4 applications. The reason of this choice is that webpack has a lot of plugins that they... Continue Reading →
Attachments management with Angular 2
A common issue that we faced in our applications is implement a component to allow the management of the attachment upload. We need to insert a file input field in the page, grab the change event of the field, extract the file and send it to a service. Recently I have needed to implement this... Continue Reading →
Http service in Angular 2
Use the http service in Angular 1 meant to deal with promises and defer, because it was based on APIs exposed by the $q service. Angular 2 makes a step ahead and the new implementation of the http service involves the observable pattern, with the using of RxJS javascript library. Why this big change? Because... Continue Reading →
Translations in Angular 2
A common requirement in Angular 2 is configure and share a service used from all the components of the application. In a multilanguage application, a service that we need to use is the provider for the language translations; obviously this module will be used in all the components, or at least in those that have... Continue Reading →
Lazy loading of modules in Angular 2
In the last post I shortly mentioned the ability of Angular 2 router to load lazily the application modules. This topic deserves more explanations, so let's go into details about this feature. The start point is an Angular 2 applications with a couple of indipendent modules; in orther to have better performances we want to... Continue Reading →
Feature modules in Angular 2
Angular 2 give us the chance to organize our application in modules. Briefly, a module is a library where there may be components, directives and pipes and define a block of functionalities; Angular 2 libraries itself are modules, like FormsModule, HttpModule. One cool behaviour of the modules is the ability to be loaded eagerly or lazyly through... Continue Reading →