These are chat archives for AngularClass/angular2-webpack-starter

7th
Feb 2017
akbhartomo
@akbhartomo
Feb 07 2017 07:06
Hello everybody!
I'm a beginner to learning angular 2, and now i'm starting to use angular2-webpack
akbhartomo
@akbhartomo
Feb 07 2017 07:13
How can I create/generate new component or service etc in my command line. Because I have trouble here

akbhartomo@Tomo ~
$ cd C:/projects

akbhartomo@Tomo /cygdrive/c/projects
$ cd ufi

akbhartomo@Tomo /cygdrive/c/projects/ufi
$ ng g service test
As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release,
which will only support Node 6.9 and greater. This package will be officially deprecated
shortly after.

To disable this warning use "ng set --global warnings.packageDeprecation=false".

You have to be inside an angular-cli project in order to use the generate command.

akbhartomo@Tomo /cygdrive/c/projects/ufi
$
indahouse-aleksandr
@indahouse-aleksandr
Feb 07 2017 08:43
@akbhartomo You have to be inside an angular-cli project in order to use the generate command.
@akbhartomo Create a project using > ng new myapp or try > ng init in existing directory
indahouse-aleksandr
@indahouse-aleksandr
Feb 07 2017 08:48
@akbhartomo Be careful with this command ng init
akbhartomo
@akbhartomo
Feb 07 2017 08:55
@indahouse-aleksandr Okay, but i'm starting with angular2-webpack-starter. With starting "ng" in my command is can't run
indahouse-aleksandr
@indahouse-aleksandr
Feb 07 2017 08:58
@akbhartomo Dude ... I just use ng
https://angular.io/docs/ts/latest/cli-quickstart.html
gcbenjamin
@gcbenjamin
Feb 07 2017 12:23
Hi, having some issues with webpack. I get the error GET http://localhost:3000/home.component.html 404 (Not Found). If I change the line in home.component.ts from templateUrl: './home.component.html' to template: require('./home.component.html') everything works, even the templateUrl which I don't change
Sorry, I mean the stylesUrl which I don't change
So stylesUrl works with styleUrls: [ './home.component.css' ], but templateUrl doesn't work using ./ but does work using require or absolute path
vezinadj
@vezinadj
Feb 07 2017 14:02
I am currently having some issues with creating unit tests using your karma configuration / karma.shim.js / web pack configuration minus some of the plugins. Everything is pretty much the same, but when I create a spec file for unit tests, I get an error where it is trying to interpret the typescript as javascript and cannot recognize any of the type system in a .ts file. I think that karma isn't picking up the source maps. Here is the error when I try to define an HTMLElement type in app.component.spec.ts:
WARNING in ./source/app/app.component.spec.ts
Module parse failed: /source/app/app.component.spec.ts Unexpected token (8:10)
You may need an appropriate loader to handle this file type.
|
| describe('AppComponent (inline template)', () => {
| let el: HTMLElement;
|
| it('Should test matchers', () => {
07 02 2017 09:01:08.832:WARN [reporter]: SourceMap position not found for trace: undefined
07 02 2017 09:01:08.832:WARN [reporter]: SourceMap position not found for trace: undefined
Max
@maxkarpovets
Feb 07 2017 14:18
Hello everyone!
Will webpack be updated to webpack2 in this starter kit??
Someone khow this?
vezinadj
@vezinadj
Feb 07 2017 14:50
It pretty much already is. The webpack config already uses 'rules'
Max
@maxkarpovets
Feb 07 2017 14:55
"webpack": "2.2.0",
It looks that it already uses webpack2
Marthayaputra
@marthayaputra_twitter
Feb 07 2017 15:22
Hi guys, I'm trying web pack and tried to add a new component with templateUrl, however I got 404 instead, if using inline template it's fine. I followed everything from home component. Anyone know how to solve this?
Bnaya Peretz
@Bnaya
Feb 07 2017 18:36
Is there any similar project to make libraries for angu 2?