stackblitz

Export Angular project from StackBlitz to local

大城市里の小女人 提交于 2020-05-24 18:05:13
问题 I would like to export an Angular project done in StackBlitz an execute it from Angular CLI with the command ng serve as we do with an Angular project created in our local machines. 回答1: Just do it. Here is where you need to click: 回答2: To resolve this error: ENOENT: no such file or directory, stat '/.../projectFolder/tsconfig.app.json' After downloading the project from StackBlitz I copied the zip to a folder. The tsconfig.app.json file for my project was located in the src folder. To

Export Angular project from StackBlitz to local

那年仲夏 提交于 2020-05-24 18:03:07
问题 I would like to export an Angular project done in StackBlitz an execute it from Angular CLI with the command ng serve as we do with an Angular project created in our local machines. 回答1: Just do it. Here is where you need to click: 回答2: To resolve this error: ENOENT: no such file or directory, stat '/.../projectFolder/tsconfig.app.json' After downloading the project from StackBlitz I copied the zip to a folder. The tsconfig.app.json file for my project was located in the src folder. To

Using Object.values() in Stackblitz Angular Project

♀尐吖头ヾ 提交于 2019-12-23 10:18:30
问题 In this stackblitz project we can use Object.values() . I'm trying to use it in this Angular project and it throws: Property 'values' does not exist on type 'ObjectConstructor'. I know that in general typescript projects via have to say that it's for a ES2017 environment specifically in TSConfig. Is there some setting in Stackblitz that can be flipped for this? IIUC Angular should get Object.values from CoreJS. 回答1: I figured out that to fix that problem you can simply install typescript in

Angular elements error . "Failed to construct 'HTMLElement …'

こ雲淡風輕ζ 提交于 2019-12-22 06:16:06
问题 I am trying out a very simple application on angular elements on stackblitz and I am getting the following issue. Error: Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function. All I am trying to do is trying to display hello world. I didn't face any issue doing this on visual code locally, however, this issue comes up on stackblitz. Not sure I have to follow some additional steps on stackblitz in order for me to run this

How do you load a JSON in a Stackblitz project?

三世轮回 提交于 2019-12-21 20:48:54
问题 I'm working in Stackblitz and one of my files is a JSON file with some data. I want to get this JSON data into my javascript file index.js . But how? When I try loading it with xhr , like this: function loadJSON(callback) { var xobj = new XMLHttpRequest(); xobj.overrideMimeType("application/json"); xobj.open('GET', './data.json', true); // Replace 'my_data' with the path to your file xobj.onreadystatechange = function () { if (xobj.readyState == 4 && xobj.status == "200") { // Required use of

Can't find packages in stackblitz, even though it is present in npm website. How to install then?

和自甴很熟 提交于 2019-12-14 04:03:30
问题 I was installing dependencies for polymer app in stackblitz. It said 3 packages could not be found, but ther were present in npm website. I tried cdn also. Even that did not work. Screenshots: I have also installed CDN from this website in external sources of stackblitz. Please help where am i going wrong. Thanks in advance. 回答1: This stackoverflow answer helped me. Installing like: @polymer/iron-ajax@3.0.0-pre.21 worked for me. 来源: https://stackoverflow.com/questions/52196838/cant-find

Angular Material Stepper not working on StackBlitz

柔情痞子 提交于 2019-12-13 03:47:06
问题 I'm working on an idea to create a quiz primarily using the Angular Material Stepper. I have the concept working on my localhost but I'd like to put it on StackBlitz so I can easily share the concept with coworkers with just a link. I've followed all the steps npm install --save @angular/material @angular/cdk npm install --save @angular/animations Import the NgModule for each component you want to use: Include a theme Gesture Support And I'm still seeing a blank screen when I try to use <mat

How to add chartjs plugin funnel, plugin in stackblitz?

天大地大妈咪最大 提交于 2019-12-11 16:43:21
问题 I am trying to create an angular6 Primeng 6 app in stackblitz. I am using PrimeNg chart in it. Also I want to add use chartjs-plugin-datalabels and chartjs-plugin-funnel . I am able to ChartJs and chartjs-plugin-datalabels but not able to find how to use chartjs-plugin-funnel . Chartjs funnel NPM My Stackbliz URL 回答1: Update: Sorry was away from keyboard when I posted the last link, I am at computer now and had a chance to play with this a bit. This one is a little different from the other

How do you load a JSON in a Stackblitz project?

纵然是瞬间 提交于 2019-12-04 12:45:42
I'm working in Stackblitz and one of my files is a JSON file with some data. I want to get this JSON data into my javascript file index.js . But how? When I try loading it with xhr , like this: function loadJSON(callback) { var xobj = new XMLHttpRequest(); xobj.overrideMimeType("application/json"); xobj.open('GET', './data.json', true); // Replace 'my_data' with the path to your file xobj.onreadystatechange = function () { if (xobj.readyState == 4 && xobj.status == "200") { // Required use of an anonymous callback as .open will NOT return a value but simply returns undefined in asynchronous

How to downgrade the dependencies for npm packages in StackBlitz?

醉酒当歌 提交于 2019-12-04 01:24:37
问题 I'm trying to create an app for demo propose on StackBlitz and must use Angular 5.2.x because my app is still using 5.2.x. I just can't downgrade from v6 to v5.2 when I try to install the dependencies. I actually need e.g. "@angular/common": "^5.2.10", "rxjs": "^5.5.10", "@angular/http": "^5.2.10" etc. But it just force me to install the v6. Is there a possibilities to avoid this and install the needed versions or there is no way? Have been checking the doc for Stackblitz, but didn't find