Browsing Tag

Injectable

The explanation is deep and complex but a quick summary is that unless an  sets certain headers in the response a browser will reject the response, the iTune we use doesn’t set those headers so by default any response gets rejected.So far in this section we’ve solved this by installing a chrome…
Read More...

Angular HttpClient: Interceptors ← Alligator.io

Interceptors provide a mechanism to intercept and/or mutate outgoing requests or incoming responses.Interceptors can be really useful for features like caching and logging.This particular interceptor simply uses the RxJS do operator to log…

10 Ways to Misuse Angular

import { Component } from selector: 'my-card', template: ` h1 class="card-title"{{ title }}/h1 p class="card-body" ng-content/ng-content /p ` }) export class CardComponent { title = 'Title of card'; } We can style the :host element by…

Weekend Coder: Angular Tour of Heroes

x there’s the new Tour of Heroes tutorial for the new Angular.So far the new Angular reminds me of good old Knockout.js in terms of ease of understanding and moving around an application.In the services module in one part of the tutorial I…

Real-World Angular Series, Part 2a: Authentication

Open this file and customize the following code with your own Auth0 client and API information: Authentication logic on the front-end will be handled with an authentication service.The constructor checks the current authentication status…

Making HTTP Calls Using Angular

HTTP Calls in Angular 2 To use the Angular 2 Http module in our components, we have to first import the Http module.To do so, create new file inside the /src/app/ folder called app.service.ts and paste the code shown { Injectable } from {…

Real-World Angular Series

Part 3 of the tutorial series covers fetching data from MongoDB with a Node API and displaying and filtering it with Angular.The third installment in the series covers fetching data from MongoDB with a Node API and displaying and filtering…

AngularJS Dependency Injection

You can’t just use any name that you like for your function parameters where you expect dependencies to be injected.It turns out Angular just reads the function definition using toString and parses the string to extract the parameter…