Welcome to my site. I use this site as a repository to dump knowledge I come across, generally in the areas of software engineering and information technologies, but may include other miscellaneous tidbits. Most of the posts are written as notes for my personal reference.
if i.hear then
i.forget
if i.see then
i.remember
if i.do then
i.understand
Client-side routing (all done on the client through angular’s routing engine). The index.html must have the <base> element <!doctype html> <html> <head> <metacharset=”utf-8″> <title>Myquickstart</title> <base href=”/”> <metaname=”viewport”content=”width=device-width, initial-scale=1″> <linkrel=”icon”type=”image/x-icon”href=”favicon.ico”> </head> <body> <app-root>Loading…</app-root> </body> </html> The <base> element is recognized by the router and instructs how to compose navigation URLs. The app.module.ts file must have the […]
The HttpModule is Angular’s built-in module for working with HTTP requests/responses. This needs to be imported in the module that will contain the service making the calls. import { BrowserModule } from ‘@angular/platform-browser’; import { NgModule } from ‘@angular/core’; import { FormsModule } from ‘@angular/forms’; import { HttpModule } from ‘@angular/http’; import { AppComponent } […]
We provide services so that the dependency injection can inject them when needed. By best practice, we name services to be provided with the word “Service”, ex SalaryService. A service is simply a class. Note that services have the “@Injectable” decorator. import { Injectable } from ‘@angular/core’; @Injectable() export class SalaryService { getSalaries() { return […]
Components contain metadata at the top and exported classed on the bottom. Example: @Component({ selector: ‘app-root’, template: ‘<app-position></app-position>’, styleUrls: [‘./app.component.css’] }) export class AppComponent { private jobPosition = “CEO”; hidePosition = false; getData() { return this.jobPosition; } } Selectors The selector defines how a component is added […]
A module is the bucket that contains the basic building blocks (components, services, etc) of an angular application. Every Angular application must have at least one module. Best practice says we define this as app.module. A module has the following key items defined within it. Declarations – list of components/directives/pipes that included in this module […]
Most articles out there about Angular2 with .Net use .NET Core and Visual Studio Code as the IDE (with node serving behind it). For the few of us procrastinators who haven’t moved on to the latest, its difficult to find examples and documentation on using Angular2+ with old .Net 4.5+. Full blog post about this […]
Reactive Programming Paradigm Asynchronous programming Works with Functional Programming ReactiveX works with many languages JS .Net Java More information: http://reactivex.io/intro.html Mission Statement ReactiveX observable model allows you to treat streams of asynchronous events with the same sort simple, composable operations that you use for collections of data items like arrays. It frees you […]
Course Notes Lecture Series by Michael Wysession, Ph.D. Professor of Earth and Planetary Sciences Washington University Energy and Human Civilization The human demand for energy is increasing. There are many different energy sources, though no single solution on which is best. There is a cost and benefit for all energy resources. Energy affects the […]
This is a simple app that is hosted on Azure. It uses ASP.NET Core with Angular2 front end and WebAPI on the back. The site and database are hosted on Azure and use Azure’s EasyAuth (link tbd) authentication service. This service allows for user login using their Microsoft, Google or Facebook accounts. The app has […]
Dependency Injection (DI) is software design pattern that decouples (or loosely couples) components in an application. It is based on the Dependency Inversion Principle (DIP) which is part of a greater design principle of Inversion of Control (IOC). The components of an application, whether it be classes or modules, are instantiated at run-time – which […]