angular5

Failed: unknown error: angular is not defined

﹥>﹥吖頭↗ 提交于 2019-12-24 19:25:13
问题 i have this error : - Failed: unknown error: angular is not defined (Session info: chrome=62.0.3202.94) (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.10.0-20-generic x86_64) when i execute my e2e tests when i use sendKeys : return element(by.model('email')).sendKeys('mike@test.test'); package.json : { "name": "app", "version": "0.0.0", "license": "", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "build-i18n-dev": "rm

Angular 5 Routing can go to link by click but not by link

喜夏-厌秋 提交于 2019-12-24 19:23:41
问题 I'm a beginner having problem with Angular 5 Routing. I'm following this tutorial http://devarea.com/angular-5-routing-practical-guide/ Also tried some other tutorials and the result is the same. I'm on Windows 7 64 bit. When I click the link, say, "books", it goes to the correct page showing "localhost:4200/books", but if I enter exactly that or refresh the page, it shows "Cannot GET /books". Is this a bug? I made sure to read the tutorials over and over again. UPDATE: I was using Firefox 52

Bing map integration in Angular 5

左心房为你撑大大i 提交于 2019-12-24 15:33:39
问题 I tried to implement bing map in angular 4. I used angular-map package but it throws Microsoft reference issue. Please see the below code and share the example import { Component,OnInit, ViewChild } from '@angular/core'; import { BingMapsLoader } from '../../shared/services/map-loader-service'; @Component({ selector: 'pm-map', template: ` <app-bing-map *ngIf='mapReady'></app-bing-map>` }) export class DeviceMapComponent implements OnInit{ mapReady = false; constructor() { BingMapsLoader.load(

value from Observable within Observable using angularfire2 firestore

我是研究僧i 提交于 2019-12-24 14:40:36
问题 I am trying to query a sub-collection if exists while querying for document from collection . My first query returns/maps data properly but when I try to query the subcollection it will be stored as observable within the Observable<data> . Below is what I have/tried so far. component.ts availableCategoriesCollection: AngularFirestoreCollection<Category>; availableCategories$: Observable<CategoryId[]>; lstCategories: Observable<any>; this.availableCategoriesCollection = this.httpDataService

separate mat-horizontal-stepper labels and content

本小妞迷上赌 提交于 2019-12-24 12:09:17
问题 I want the stepper labels to be shown in a toolbar, but the content to be shown in another div. something like: <div> <mat-horizontal-stepper md-stretch-steppers="always"> <mat-step> <ng-template matStepLabel>Head 1</ng-template> </mat-step> <mat-step> <ng-template matStepLabel>Head 1</ng-template> </mat-step> </mat-horizontal-stepper> </div> <div> <any-components></any-components> </div> <div id="contents"> [contents goes here] </div> can i separate the stepper labels from the content? 来源:

separate mat-horizontal-stepper labels and content

我是研究僧i 提交于 2019-12-24 12:07:40
问题 I want the stepper labels to be shown in a toolbar, but the content to be shown in another div. something like: <div> <mat-horizontal-stepper md-stretch-steppers="always"> <mat-step> <ng-template matStepLabel>Head 1</ng-template> </mat-step> <mat-step> <ng-template matStepLabel>Head 1</ng-template> </mat-step> </mat-horizontal-stepper> </div> <div> <any-components></any-components> </div> <div id="contents"> [contents goes here] </div> can i separate the stepper labels from the content? 来源:

How to redirect to angular 6 page when user click on account activation in email

别等时光非礼了梦想. 提交于 2019-12-24 11:06:58
问题 How to redirect to angular 6 page when the user clicks on account activation in the email. My process flow: 1. User register account. 2. The user gets activation account link from the email. Link example: http://localhost/editProfile/{userId} /token/{token}. This should be my API which gets JWT token from backend. 3. User click on the link and user will redirect to edit profile page. My problem is I do not understand by using angular 6 when user redirects to edit profile page how I can get

How to pause the route change in navigationStart router event

霸气de小男生 提交于 2019-12-24 10:59:57
问题 In my application I have routes exposed from packages (node modules). So i couldn't use canActivate or canDeactivate for the routes defined inside node modules. So I started subscribing to all route change in my app component and based on condition i am redirecting the user to different routes. Since the condition has API call, the route change is not paused in the navigationStart instead it completes the routing to other page and once API call is successful the redirect happens to the other

ng serve error localhost could NOT be bound

拥有回忆 提交于 2019-12-24 10:47:35
问题 I am new in angular 5, I am try to run angular 5 project get following error "ng serve error localhost could NOT be bound". any one can help me. example: D:\workspace\newapp>ng serve Provided host localhost could NOT be bound. Please provide a different host address or hostname Error: Provided host localhost could NOT be bound. Please provide a different host address or hostname`enter code here` at D:\workspace\newapp\node_modules\portfinder\lib\portfinder.js:139:27 at D:\workspace\newapp

'object' does not contain such a member Angular 5

99封情书 提交于 2019-12-24 10:38:38
问题 I am new to Angular and trying to make a small application. I referred 'object' does not contain such a member answer but I am not getting my solution from there. profile.component.ts import { Component, OnInit } from '@angular/core'; import { AuthService } from '../../services/auth.service'; import { Router } from '@angular/router'; @Component({ selector: 'app-profile', templateUrl: './profile.component.html', styleUrls: ['./profile.component.css'] }) export class ProfileComponent implements