Tutorial by Examples: angular

These locators should be used as a priority when possible, because they are more persistent to changes in an application then locators based on css or xpath, which can easily break. Binding locator Syntax by.binding('bind value') Example View <span>{{user.password}}</span> <s...
In this example, we will be using @angular/cli (latest) and the latest version of @angular/material. You should at least know the basics of Angular 2/4 before continuing the steps below. Install angular material module from npm: npm install @angular/material --save 2.0.0-beta.3 This on...
This example will be how to install from master and will be using @angular/cli as well. Make a new project with @angular/cli: ng new my-master-app If you haven't installed @angular/cli, use this command: npm install -g @angular/cli Install from master: npm install --save @angular/a...
$http.post("\<domain\>/user-registration/", {username: username, password: password}) .then(function (data) { // Do success actions here });
ng-repeat is the built-in directive provided by AngularJS, mostly used for listing the array elements on UI dynamically as per the changes in our model. Official "ng-repeat" docs can be found at : https://docs.angularjs.org/api/ng/directive/ngRepeat Also the most common error faced whil...
Yarn is an alternative for npm, the default package manager on @angular/cli. If you want to use yarn as package manager for @angular/cli follow this steps: Requirements yarn (npm install --global yarn or see the installation page) @angular/cli (npm install -g @angular/cli or yarn global add @an...
First of all you need to initialize the angularfire modules in your app module like this: const firebaseConfig = { apiKey: 'XXXXXXXXXX', authDomain: 'XXXXXXXXXX', databaseURL: 'XXXXXXXXXX', storageBucket: 'XXXXXXXXXX', messagingSenderId: 'XXXXXXXXXX' }; You can get this keys by...
Once you have it on your app, just import it: import { AngularFireDatabase } from 'angularfire2/database'; constructor (private _af: AngularFireDatabase) {} With this Observable List you can access to a list of items under a path, for example if you have root/items/food you can get food items l...
import { Injectable } from '@angular/core'; import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http'; import { UserService } from '../services/user.service'; import { Observable } from 'rxjs/Observable'; @Injectable() export class AuthHeaderInterceptor imple...

Page 6 of 6