antonybudianto / angular-starter

:star: Gulp Angular Starter using TypeScript (Updated to 4.4.3)

Home Page:https://antonybudianto.github.io/angular-starter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Will it work with Visual Studio . I tried but facing some unexpected token errors while loading files

opened this issue · comments

Issue Overview

<Please explain the issue overview here, short but concise and to-the-point>

Issue Description

Reproducables

<Please explain the way to reproduce your issue, or even better with Plunker link>

Information

Operating System Windows/OSX/Ubuntu/orYourOSHere
Node version 4.x/5.x/orYourNodeVersionHere
NPM Version 2.x/3.x/orYourNPMVersionHere
Environment Browser/Mobile/WebWorker

any IDE should be fine, maybe you need to install some plugin to make it works

@antonybudianto Can you explain what kind of plugin that we can use to make this project work with Visual Studio? I have followed Angular guide to setup this project with Visual Studio 2015 where I encountered errors as shown below:

I'm getting compile errors for config\env\env.ts when I build this project in Visual Studio.
1>------ Build started: Project: angular-starter-master-vs2015, Configuration: Debug Any CPU ------ 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(14,29): error TS1136: Build:Property assignment expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(14,30): error TS1109: Build:Expression expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(14,65): error TS1109: Build:Expression expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(14,66): error TS1109: Build:Expression expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(15,6): error TS1110: Build:Type expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(15,12): error TS1109: Build:Expression expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(15,13): error TS1109: Build:Expression expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(15,16): error TS1110: Build:Type expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(15,56): error TS1109: Build:Expression expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(15,57): error TS1109: Build:Expression expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(15,59): error TS1110: Build:Type expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(15,61): error TS1109: Build:Expression expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(15,65): error TS1109: Build:Expression expected. 1>C:\Users\sunkum\Desktop\angular-starter-master-vs2015\angular-starter-master-vs2015\config\env\env.ts(16,1): error TS1109: Build:Expression expected. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

And getting Console log when I run angular starter project from Visual Studio 2015
index.html:37 Error: Unexpected token < Evaluating http://localhost:8048/src/src/tmp/app/main.js Loading app/main.js at eval () at Re (system.js:4) at system.js:4 at j (system.js:4) at O (system.js:4) at k (system.js:4) at system.js:4 at ZoneDelegate.invoke (zone.js:392) at Zone.run (zone.js:142) at zone.js:873

this file https://github.com/antonybudianto/angular-starter/blob/master/config/env/env.ts
is a template file (to be used to generate env.model.ts), not a source code file.
You can safely ignore/exclude this file from your IDE build step.

@antonybudianto So can I ignore env folder itself?

correct.

You can add the folder on https://github.com/antonybudianto/angular-starter/blob/master/tsconfig.json#L14, assuming the IDE is reading from tsconfig.json (should be by default)

@antonybudianto So how can we avoid above console log when I run project(launch index.html) from VS2015 or Do I need to change any other configuration that can work with VS2015?