Chelsie  Towne

Chelsie Towne

1592296073

Fixing CORS errors with Angular CLI proxy

Trying to access an API endpoint while building on localhost can be traumatizing, especially when this error “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” comes up. Don’t worry it wasn’t your fault, the error is due to the same-origin policy that is implemented by most browsers.

#javascript #angular #frontend-development

What is GEEK

Buddha Community

Fixing CORS errors with Angular CLI proxy
Christa  Stehr

Christa Stehr

1598940617

Install Angular - Angular Environment Setup Process

Angular is a TypeScript based framework that works in synchronization with HTML, CSS, and JavaScript. To work with angular, domain knowledge of these 3 is required.

  1. Installing Node.js and npm
  2. Installing Angular CLI
  3. Creating workspace
  4. Deploying your First App

In this article, you will get to know about the Angular Environment setup process. After reading this article, you will be able to install, setup, create, and launch your own application in Angular. So let’s start!!!

Angular environment setup

Install Angular in Easy Steps

For Installing Angular on your Machine, there are 2 prerequisites:

  • Node.js
  • npm Package Manager
Node.js

First you need to have Node.js installed as Angular require current, active LTS or maintenance LTS version of Node.js

Download and Install Node.js version suitable for your machine’s operating system.

Npm Package Manager

Angular, Angular CLI and Angular applications are dependent on npm packages. By installing Node.js, you have automatically installed the npm Package manager which will be the base for installing angular in your system. To check the presence of npm client and Angular version check of npm client, run this command:

  1. npm -v

Installing Angular CLI

  • Open Terminal/Command Prompt
  • To install Angular CLI, run the below command:
  1. npm install -g @angular/cli

installing angular CLI

· After executing the command, Angular CLI will get installed within some time. You can check it using the following command

  1. ng --version

Workspace Creation

Now as your Angular CLI is installed, you need to create a workspace to work upon your application. Methods for it are:

  • Using CLI
  • Using Visual Studio Code
1. Using CLI

To create a workspace:

  • Navigate to the desired directory where you want to create your workspace using cd command in the Terminal/Command prompt
  • Then in the directory write this command on your terminal and provide the name of the app which you want to create. In my case I have mentioned DataFlair:
  1. Ng new YourAppName

create angular workspace

  • After running this command, it will prompt you to select from various options about the CSS and other functionalities.

angular CSS options

  • To leave everything to default, simply press the Enter or the Return key.

angular setup

#angular tutorials #angular cli install #angular environment setup #angular version check #download angular #install angular #install angular cli

John Kartan

John Kartan

1620157351

QuickBooks Error 3371 Status Code 11118 | Top 6 Solutions to Fix

QuickBooks has always been the first choice of thousands of mid-sized enterprises and solopreneurs when it comes to accounting and financing software. With the help of QuickBooks, businesses can handle all of their regular accounting activities, like managing income and expenses, tracking mileage, generating financial reports, submitting and printing tax forms, payroll, etc.
However, despite the impeccable feature that QuickBooks provides its users with, there are uncountable errors and bugs that many users often face while working with QuickBooks. With this post, we are going to discuss about QuickBooks error 3371 status code 11118 that usually happens when users try to open or activate QuickBooks Desktop applications on their computers.
While activating QuickBooks, the error code abruptly pops up on the screen with an error message, stating, “QuickBooks could not load the license data. This may be caused by missing or damaged files.” Generally, such an error gets triggered when the Microsoft MSXML component, which helps QuickBooks retrieve the license information in the QBregistration.dat file, is unregistered.

Need troubleshooting assistance to get rid of QuickBooks error 3371 status code 11118? If yes, feel free to reach our QuickBooks experts at (844-888-4666) and get the error resolved immediately.

What causes QuickBooks error 3371 could not initialize license properties?

Apart from the unregistered Microsoft MSXML component, there are several other reasons that can trigger QuickBooks error 3371 could not initialize license properties, such as:

  • The QB.registration.dat file, which contains all the license information, is damaged or corrupted.
  • Due to outdated Windows operating system.
  • Any QuickBooks program file is damaged or corrupted.

What should you do to rectify QuickBooks error 3371 status code 11118?

Solution 1) Manually register Microsoft MSXML DLL files

For the 32-Bit Windows operating system:

  • Open the Run command window by pressing Windows + R keys on the keyboard.
  • Type “cmd” in the Run command dialog box and then press the Enter key to open Command Prompt.
  • Now, you need to type regsvr32 MSXML6.dll in the command prompt window and then press the Enter key.

For the 64-Bit Windows operating system:

  • At first, press Windows + R keys simultaneously to open the Run command window.
  • In the Open: field, you need to type “cmd” and then click on the OK button.
  • At the C: prompt, type cd\windows\syswow64.
  • Thereafter, you need to enter regsvr32 MSXML6.dll and then press the Enter key.

Solution 2) Remove the Entitlement file and re-register QuickBooks Desktop

  • Open the Windows File Explorer by pressing Windows + E keys simultaneously on the keyboard.
  • Navigate to the following path: C:\ProgramData\Intuit\Entitlement Client\v8.
  • In the v8 folder, search for the file named EntitlementDataStore.ecml, and right-click it.
  • Choose the Delete option and then hit the Yes button to confirm.
  • Open the QuickBooks application and re-register it using the license & product information.

Solution 3) Get the Windows updated to the latest release

  • Select the Windows Start menu, type “settings” in the search column, and then open Settings.
  • Click on the Update & Security option.
  • Select the Windows Update tab from the left panel.
  • At last, click the Check for Updates option to download and install the Windows update.

Solution 4) Run the 3371 Error Fix tool to resolve QuickBooks license, validation, and registration errors.

  • Download the latest version of the QuickBooks Tool Hub (1.4.0.0) from Intuit’s official website.
  • Select the downloaded file (QuickBooksToolHub.exe) and follow the instructions you see on the computer screen.
  • Give your consent to terms and conditions to finish installing the QuickBooks Tool Hub.
  • Open the QB Tool Hub by double-clicking its icon.
  • Select the Installation Issues tab and then choose the 3371 Error Fix option.
  • Hit the OK button.

Solution 5) Repair the QuickBooks Desktop program for Windows

  • Select the Windows Start menu, type “Control Panel” in the search column, and then open Control Panel.
  • In the control panel, choose the Programs and Features option.
  • From the list of installed programs, select QuickBooks and then choose the Repair option.
  • Hit the Next button.
  • Once QuickBooks repairing is done, click on the Finish button.

Conclusion:

Even after following all the troubleshooting steps mentioned in the post, if you can’t resolve QuickBooks error 3371 status code 11118, then there is a great possibility that the Windows Firewall or any third-party security application is blocking necessary QuickBooks installation files. We suggest you restore any blocked QuickBooks file from security applications and make exceptions for QuickBooks programs to prevent them from being scanned. You can also reach our QuickBooks professionals at (844-888-4666) for troubleshooting assistance and get the error resolved immediately.

#error 3371 could not initialize license properties #fatal error: quickbooks has encountered a problem on startup #how to fix quickbooks error 3371 #i have received the on start up [error 3371 #quickbooks 2016 & win 7 error 3371 #quickbooks error 3371

Roberta  Ward

Roberta Ward

1593061105

Tutorial: Nx-style monorepo workspace with Angular CLI: Part 2

In Part 1 of this tutorial, we set up the booking desktop application project, a project for its end-to-end test suite, and the booking feature shell workspace library.

In this part, we’ll set up our custom generate project tool to automate the steps we did manually in Part 1. We’ll use it to create the shared and booking data acess libraries with NgRx Store, NgRx Effects, NgRx Schematics, and NgRx Store DevTools.

To configure the data access libraries while keeping the flow of dependencies correct, we’ll extract a shared environments library. Data access will be hooked up to the booking feature shell library.

#angular #angular-cli #angular-workspace #monorepo #nx #series-angular-architectural-patterns #ngrx

Roberta  Ward

Roberta Ward

1595337024

Tutorial: Nx-style monorepo workspace with Angular CLI: Part 3

In Part 3 of this tutorial, we create the passenger info and flight search feature libraries. We use the generate project tool to create the mobile booking application and its test project. Finally, we create a mobile version of the flight search component template.

This tutorial is part of the Angular Architectural Patterns series.

In Part 2 of this tutorial, we used the generate project tool to generate the booking data access and shared data access workspace libraries with NgRx Store and Effects. We extracted a shared environments library and hooked everything up to the booking feature shell library.

In this part of the tutorial, we’re going to create the passenger info and flight search feature libraries, each with a routed component. After that, we’ll create the mobile booking application project and its end-to-end test project. Finally, we’ll use builder file replacement to create a mobile version of the flight search component template.

THIS AD MAKES CONTENT FREE. HIDE

Passenger info feature library#

Let’s create our first feature library, the passenger info feature which is part of the booking domain.

npm run generate-project -- library feature feature-passenger-info --scope=booking --npm-scope=nrwl-airlines
# or
yarn generate-project library feature feature-passenger-info --scope=booking --npm-scope=nrwl-airlines
<>

Generate passenger info feature library.

After generating the project using the previous commands and parameters, we get this file and folder structure.

libs/booking/feature-passenger-info
├── src
│   ├── lib
│   │   ├── passenger-info
│   │   │   ├── passenger-info.component.css
│   │   │   ├── passenger-info.component.html
│   │   │   ├── passenger-info.component.spec.ts
│   │   │   └── passenger-info.component.ts
│   │   ├── booking-feature-passenger-info.module.spec.ts
│   │   └── booking-feature-passenger-info.module.ts
│   ├── index.ts
│   └── test.ts
├── README.md
├── karma.conf.js
├── tsconfig.lib.json
├── tsconfig.spec.json
└── tslint.json
<>

The file and folder structure of the booking passenger info feature library.

This looks a little different from a feature shell library and a data access library.

After the generate project tool has created the workspace library with an entry point Angular module, it runs the commands in the next listing.

The generate project tool also removed the --no-common-module flag from the ng generate module command we saw earlier, since this Angular module will be declaring components.

ng generate component passenger-info --project=booking-feature-passenger-info --module=booking-feature-passenger-info.module.ts --display-block
<>

Generate component command run when generating a feature library.

Let’s look at the Angular module our tool has generated.

// booking-feature-passenger-info.module.ts
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import {
  PassengerInfoComponent,
} from './passenger-info/passenger-info.component';

@NgModule({
  declarations: [PassengerInfoComponent],
  imports: [
    CommonModule,
  ],
})
export class BookingFeaturePassengerInfoModule {}
<>

Initial entry point Angular module in the passenger info feature library.

The entry point Angular module shown in the previous listing is a good starting point. We need to set up the feature routing for our component though. This is done in the next listing.

// booking-feature-passenger-info.module.ts
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import {
  PassengerInfoComponent,
} from './passenger-info/passenger-info.component';

const routes: Routes = [
  {
    path: '',
    pathMatch: 'full',
    component: PassengerInfoComponent,
  },
];

@NgModule({
  declarations: [PassengerInfoComponent],
  imports: [
    RouterModule.forChild(routes),
    CommonModule,
  ],
})
export class BookingFeaturePassengerInfoModule {}
<>

Passenger info feature Angular module with route configuration for its entry point component.

Nice! Now we’ve prepared our feature library to be hooked up to the feature shell library’s routing configuration.

The generated component is what you’d expect. What it’d display in a real booking application is not really important for the purpose of this article.

Let’s hook up this feature to the booking application’s routing by adding a route configuration to the booking feature shell Angular module as seen here.

#angular #angular-cli #angular-workspace #monorepo #nx #series-angular-architectural-patterns

Roberta  Ward

Roberta Ward

1595333359

Tutorial: Nx-style monorepo workspace with Angular CLI: Part 5

In the final part of this tutorial, we create the seatmap data access, seat listing feature, shared buttons UI, and shared formatting utilities library. Finally, we compare our approach with the full Nx toolchain.

This tutorial is part of the Angular Architectural Patterns series.

In Part 4 of this tutorial, we used our generate project tool to create the check-in data access library, the check-in feature shell library, the check-in desktop application, and the mobile check-in application. We hooked everything up and reviewed how much was automated by our tool.

In this part of the tutorial, we’re going to create the seatmap data access library with NgRx feature state. We then created the seat listing feature library and hooked it up to all applications with routing. Finally, we created the shared buttons UI library and the shared formatting utilities library which we used in the seat listing component.

THIS AD MAKES CONTENT FREE. HIDE

Seatmap data access library#

The shared seatmap feature has its own data access library. This is where we would add data services and application state management specific to the seatmap domain.

npm run generate-project -- library data-access --scope=seatmap --grouping-folder=shared/seatmap --npm-scope=nrwl-airlines --with-state
# or
yarn generate-project library data-access --scope=seatmap --grouping-folder=shared/seatmap --npm-scope=nrwl-airlines --with-state
<>

Generate the seatmap data access library.

For now, we’ll put the feature store and effects in place by using the --with-stateparameter of the generate project tool. Note that we use the nested grouping folder shared/seatmap.

// seatmap-data-access.module.ts
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';

import { SeatmapEffects } from './+state/seatmap.effects';
import * as fromSeatmap from './+state/seatmap.reducer';

@NgModule({
  imports: [
    StoreModule.forFeature(fromSeatmap.seatmapFeatureKey, fromSeatmap.reducer),
    EffectsModule.forFeature([SeatmapEffects]),
  ],
})
export class SeatmapDataAccessModule {}
<>

The seatmap data access module.

The seatmap data access Angular module gives us an overview of what’s configured in the seatmap data access library. This is a good starting point.

ng run seatmap-data-access:lint

ng run seatmap-data-access:test --watch=false
<>

Lint and test the seatmap data access library.

Everything looks ready to go!

Seat listing feature library#

It’s time to add the first feature of the seatmap domain which is used in both the check-in and booking applications.

npm run generate-project -- library feature feature-seat-listing --scope=seatmap --grouping-folder=shared/seatmap --npm-scope=nrwl-airlines
# or
yarn generate-project library feature feature-seat-listing --scope=seatmap --grouping-folder=shared/seatmap --npm-scope=nrwl-airlines
<>

Generate the seatmap seat listing feature library.

Our tool generates an Angular module and a component for us.

To add this feature to our applications, we add a route to each feature shell module.

// check-in-feature-shell.module.ts
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CheckInDataAccessModule } from '@nrwl-airlines/check-in/data-access';
import { SharedDataAccessModule } from '@nrwl-airlines/shared/data-access';

import { ShellComponent } from './shell/shell.component';

const routes: Routes = [
  {
    path: '',
    component: ShellComponent,
    children: [
      {
        path: '',
        pathMatch: 'full',
        redirectTo: 'seatmap', // 👈
      },
      {
        path: 'seatmap', // 👈
        loadChildren: () =>
          import('@nrwl-airlines/seatmap/feature-seat-listing')
            .then(esModule => esModule.SeatmapFeatureSeatListingModule),
      },
    ],
  },
];

@NgModule({
  declarations: [ShellComponent],
  exports: [RouterModule],
  imports: [
    RouterModule.forRoot(routes),
    SharedDataAccessModule,
    CheckInDataAccessModule,
    CommonModule,
  ],
})
export class CheckInFeatureShellModule {}

#angular #angular-cli #angular-workspace #monorepo #nx #series-angular-architectural-patterns #ngrx