typescript1.8

How to set local web server in Visual Studio Code

丶灬走出姿态 提交于 2021-02-18 05:10:56
问题 I am new in VS code and working in typescript.Just I am trying to set local server path to open my HTML file.how to set that and when I was trying to set always I am getting error. I can not use this (NPM install) and (NPM start) command in terminal.If I use this command I am getting error. Any proxy issue? How to resolve this issue in VS code? Folder structure: TsDemo--folder name .vscode ->launch.json ->tasks.json out ->app.js ->app.js.map app.ts index.html tsconfig.json i follwed this link

Typing error “Default export of the module has or is using private name” - switch from typescript v1.8 to 2

一曲冷凌霜 提交于 2020-08-25 04:14:09
问题 I've updated my ionic app from beta 11 to rc0. So it means I've switched from angular2 rc4 to angular2 stable and from typescript 1.8 to 2. I have a redux architecture and am using the Redux library. This line of code is giving me the following error export default combineReducers({ user,songs,app }) error TS4082: Default export of the module has or is using private name 'Reducer'. Any idea on what's going on and how to solve this? 回答1: The error went away when I made an explicit import of

How can I pass the FormGroup of a parent component to its child component using the current Form API

柔情痞子 提交于 2020-04-10 08:04:31
问题 I would like to pass the parent component's FormGroup to its child for the purpose of displaying an error-message using the child Given the following parent parent.cmponent.ts import { Component, OnInit } from '@angular/core' import { REACTIVE_FORM_DIRECTIVES, AbstractControl, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms' @Component( { moduleId: module.id, selector: 'parent-cmp', templateUrl: 'language.component.html', styleUrls: ['language.component.css'],

Loading indicator on Http requests

三世轮回 提交于 2020-01-15 02:37:28
问题 The root of my problem is displaying a loading indicator on http requests, and I want to do it at the service level without having to write code for each component. What I did was implement an http wrapper that basically does this: getMyHttpObservable(...) { setLoadingIndicator(true); const myHttpObservable = createRequestObservable().finally(()=> { console.log('http done'); setLoadingIndicator(false); }); return myHttpObservable; } I have a sequence of observables which I chain using

Load combined modular typescript file with SystemJS

有些话、适合烂在心里 提交于 2020-01-15 01:49:30
问题 I have been following the basic Angular2 implementation. With TypeScript v1.8 it should be possible to use system module with outfile so we can generated a combined file instead of multiple javascript files. I have a problem with SystemJS trying to load the combined file as I don't know exactly what parameters it needs (I've tried various combinations...) but I don't get any console errors and AngularJS isn't initialized. This is the transpiled outfile var __decorate = (this && this._

TypeScript error on compilation with webpack

穿精又带淫゛_ 提交于 2020-01-07 02:55:06
问题 I am getting an error with typescript compilation and I have no clue where its coming from - I have tried many different combinations of tsconfig.json setups but I always get the same two errors from webpack-env. (gec) ➜ optim ./node_modules/.bin/webpack --config webpack.config.js ts-loader: Using typescript@1.8.10 and /home/bischoff_s/Code/optim/tsconfig.json Hash: 0e608742cc4dff532c9a Version: webpack 1.13.1 Time: 3182ms Asset Size Chunks Chunk Names main-0e608742cc4dff532c9a.ts 5.09 MB 0,