angular-cli

Is there a compatibility list for Angular / Angular-CLI and Node.js?

青春壹個敷衍的年華 提交于 2020-02-26 00:55:51
问题 I periodically run into the problem, having to spin up old Angular projects with deprecated dependencies of Angular. Because I unsually run the latest Node.js version (at least lates LTS version) I often had the problem, that I wasn't able to get the old projects running. I solved this by using a node version manager, but still I often have the problem that I'm not sure what is the best Node.js version to use for Angular Version X. Sadly the official release notes handle this topic shabbily

Is there a compatibility list for Angular / Angular-CLI and Node.js?

偶尔善良 提交于 2020-02-26 00:55:33
问题 I periodically run into the problem, having to spin up old Angular projects with deprecated dependencies of Angular. Because I unsually run the latest Node.js version (at least lates LTS version) I often had the problem, that I wasn't able to get the old projects running. I solved this by using a node version manager, but still I often have the problem that I'm not sure what is the best Node.js version to use for Angular Version X. Sadly the official release notes handle this topic shabbily

Error while running ng serve command in Angular 2 project

↘锁芯ラ 提交于 2020-02-24 14:50:10
问题 I have recently created a project using angular-cli and am unable to run it using ng serve while running ng serve command it throws this error Cannot read property 'AssetUrl' of undefined TypeError: Cannot read property 'AssetUrl' of undefined at Object. (/Users/shaan/Sites/node-apps/migration/Outgrow-frontend/node_modules/@angular/compiler-cli/src/private_import_compiler.js:10:51) 回答1: Consider taking following steps: check your angular-cli.json and package.json for version of angular-cli in

Property 'Draw' does not exist on type 'typeof Control'

两盒软妹~` 提交于 2020-02-23 13:11:38
问题 I'm attempting to implement a map component with leaflet and other leaflet plugins. The issue is other plugins don't work from TypeScript for some reason. For example I'm unable to compile code with leaflet-draw plugin and getting the error: Property 'Draw' does not exist on type 'typeof Control' mapbox.component.ts import { DataService } from "../data-service.service"; import { Component, OnInit } from '@angular/core'; import * as $ from 'jquery'; /// <reference types="leaflet" /> ///

Property 'Draw' does not exist on type 'typeof Control'

冷暖自知 提交于 2020-02-23 13:05:48
问题 I'm attempting to implement a map component with leaflet and other leaflet plugins. The issue is other plugins don't work from TypeScript for some reason. For example I'm unable to compile code with leaflet-draw plugin and getting the error: Property 'Draw' does not exist on type 'typeof Control' mapbox.component.ts import { DataService } from "../data-service.service"; import { Component, OnInit } from '@angular/core'; import * as $ from 'jquery'; /// <reference types="leaflet" /> ///

Angular 7 - How does work the HTML5 Fullscreen API ? I've a lot of errors

泪湿孤枕 提交于 2020-02-21 04:13:23
问题 I use Angular 7 and I would like have a button for put my app in fullscreen. I use the HTML5 Fullscreen API and I've make 2 functions : openfullscreen() { // Trigger fullscreen console.log('gg'); if (document.documentElement.requestFullscreen) { document.documentElement.requestFullscreen(); } else if (document.documentElement.mozRequestFullScreen) { /* Firefox */ document.documentElement.mozRequestFullScreen(); } else if (document.documentElement.webkitRequestFullscreen) { /* Chrome, Safari

Angular CLI custom builder

假如想象 提交于 2020-02-18 12:42:35
问题 Angular CLI 6 introduced a new concept of builders (aka Architect Targets). There are a couple of prebuilt builders that come with @angular-devkit/build_angular, but unfortunately there is no documentation that explains how to create your own builder. How do I create my own builder (for example to modify the underlying webpack configuration)? 回答1: Update: For Angular 8+ read this AngularInDepth article. For Angular 6 and 7: The full article can be found here. For the sake of simplicity I

Angular CLI custom builder

一个人想着一个人 提交于 2020-02-18 12:38:51
问题 Angular CLI 6 introduced a new concept of builders (aka Architect Targets). There are a couple of prebuilt builders that come with @angular-devkit/build_angular, but unfortunately there is no documentation that explains how to create your own builder. How do I create my own builder (for example to modify the underlying webpack configuration)? 回答1: Update: For Angular 8+ read this AngularInDepth article. For Angular 6 and 7: The full article can be found here. For the sake of simplicity I

angular-cli: 'this' resolves to a child component instead of the main component

荒凉一梦 提交于 2020-02-06 07:43:36
问题 I am trying to implement this chart component https://www.highcharts.com/stock/demo/candlestick-and-volume in my angular-cli app. The chart is getting its data from a webapi. It allows you to specify a new date range. When you do that an event is being triggered and in that event you can call your webapi service and requst new data. You configure the chart by passing in some options in the contructor this.chart = new StockChart(this.chartOptions); One of the options you can set is an event

Unit testing Nativescript application logic on a browser

删除回忆录丶 提交于 2020-02-04 22:16:44
问题 I am trying to set up unit testing for a Nativescript application, run by ng test on a browser. The problem is that whenever there is a tns-core-modules or another plugin import, the module cannot be resolved because of the platform specific files (e.g. "tns-core-modules/application/application.android.js") that never get compiled into the bundle, thus throwing an error like "Module not found: Error: Can't resolve 'tns-core-modules/application'". I know there is a built-in unit test support