Category Archives: Uncategorized

Angular2 – Deploying an Angular App

Introduction Deployment preparations and important steps Build you app for production (—prod  –aot) Set a correct <base> element Redirect all 404 errors to return index.html where Angular launch. Routes defined in Angular (such as /recipes)  are not configured in the server, so it will return a 404 error by default. So you will need to […]

Angular2 – Authentication and Route protection

Module introduction We want allow only logged in users to modify recipes How Authentication works in SPAs In SPAs authentication is managed by tokens More about jWT JSON Web tokens: https://jwt.io/ https://jwt.io/introduction/ Creating a signup page and route We create a Sign up form page and his route “/signup”. All associated to a auth/signup.component Setting up […]

Angular2 – Making Http Requests

Introduction Traditional Web apps against SPAs Example App & Backend setup We use firebase to make a test database: https://ng-http-cb90d.firebaseio.com/ NOTE: Keep in mind set database rules to get free access: { “rules”: { “.read”: “true”, “.write”: “true” } }   Sending requests (example POST) With the Angular Http class we can create Observables. But the […]

Angular2 – Handling forms: Reactive approach

Introduction to the Reactive Approach Form is created programmatically and synchronized with the DOM Reactive : Setup In the app.module we need to comment out FormsModule and add ReactiveFormsModule app.module.ts import { BrowserModule } from ‘@angular/platform-browser’; import { NgModule } from ‘@angular/core’; // import { FormsModule } from ‘@angular/forms’; import { ReactiveFormsModule } from ‘@angular/forms’; […]

Zuora: Hosted pages advanced integration

[Fuente: https://knowledgecenter.zuora.com/CA_Commerce/G_Hosted_Commerce_Pages/B_Payment_Pages_2.0/H_Integrate_Payment_Pages_2.0/A_Advanced_Integration_of_Payment_Pages_2.0] When you want to have a full control over submission of payments and interaction with Zuora, you can implement a separate function in your client for Payment Page submission.  Then you tie this function to an external submit button to invoked the function when the button is clicked. The response from payment creation is redirected to the configured […]