Home / Angular (page 2)

Angular

Creating and Using Angular 5 Services

Generating the Service File The robust Anguar CLI tool will allow us to quickly and easily generate a service file for our project. Hop into your console within the project folder and run the following command: $ ng generate service data Note: You can use ng g s data as …

Read More »

Using the Angular 5 Router

Working in the App Routing File When we started this project with the Angular CLI, we used the –routing flag, which set us up with a file located at /src/app/app-routing.module.ts, visit this file and import the 2 components we created earlier: import { NgModule } from ‘@angular/core’; import { Routes, …

Read More »

Angular 5 Animation Tutorial

Installing the Animation Library Until recently, the Angular Animation library was installed by default. But now, we have to add it manually. Visit the console in the project folder and type: $ npm install @angular/animations@latest –save Next, in /src/app/app.module.ts we need to import it: // Other imports removed for brevity …

Read More »

Angular 5 Interpolation, Property Binding & Event Binding Tutorial

Interpolation Whenever you need to communicate properties (variables, objects, arrays, etc..) from the component class to the template, you can use interpolation. The format for defining interpolation in a template is: {{ propertyName }} Open up the /src/app/home/home.component.ts component file that we’ve been working on and define the following property …

Read More »

Angular 5 Template & Styling Tutorial

Defining a Template Open up the /src/app/home/home.component.ts file that the CLI generated earlier: Notice templateUrl? This is a property that expects an external HTML file that will serve as the template for this component. If you change it to the template, you can specify inline HTML like below: We don’t …

Read More »

Angular 5 Components Tutorial

Taking a look at our project.. If you open up our new Angular 5 project in a code editor (I’m using Visual Studio Code), it will look like this: For the most part, when you’re developing, you’re only going to be working within the /src/ folder. What are Components? Angular …

Read More »

How to Install Angular 5 (Tutorial)

I feel like people are not understanding that Angular 5 is not a new framework nor was 4. There are very few changes on the surface, it is just semantic versioning. Its all just “Angular”, just like we do not say React 16. There are only 2 different frameworks and …

Read More »

Learn Angular 5 from Scratch – Angular 5 Tutorial

Hi, guys as Angular 5 released on November 1, 2017. this techdefat course will provide you with all of the fundamentals to help you get started developing Angular 5 apps Angular 5 is a powerful frontend Javascript framework is actively developed by Google, and it’s quite possibly the most popular …

Read More »

Just Started Learning Angular

Hi friends wish we good luck I am starting angular 5. while learning I will make videos how to code and the best available resources to learn and bet communities to join. Let’s Begin >> Angular 5, the next version of the popular Google-developed JavaScript framework, was to have debuted …

Read More »

What is the difference between Angular – Promise vs Observable

promise: returns a single value not cancellable more readable code with try/catch and async/await observable works with multiple values over time cancellable supports map, filter, reduce and similar operators use Reactive Extensions (RxJS) an array whose items arrive asynchronously over time     Often Observable is preferred over because Promiseit …

Read More »