Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 23 13:34
    SouravKumar89 edited #2058
  • Aug 23 13:27
    SouravKumar89 opened #2058
  • Aug 22 00:04

    PatrickJS on master

    Update README.md (compare)

  • Aug 13 17:17
    ramsunvtech commented #1925
  • Aug 12 22:58
    terrancecorley commented #770
  • Aug 09 02:30
    jindovu commented #2049
  • Aug 09 02:22
    jindovu opened #2057
  • Aug 08 10:49
    krawinkelm commented #2053
  • Jul 21 14:14
    FilipLitwora commented #958
  • Jul 21 14:14
    FilipLitwora commented #958
  • Jul 21 14:14
    FilipLitwora commented #958
  • Jul 09 11:40
    Sanafan commented #1713
  • Jul 05 11:41
    hoang-innomizetech commented #2053
  • Jul 05 07:32
    Jilaba commented #1824
  • Jun 29 04:31
    Jason-Cooke synchronize #2055
  • Jun 28 14:51
    jesslilly commented #1827
  • Jun 12 18:16
    dvaldivia commented #1969
  • Jun 12 17:55
    dvaldivia commented #2049
  • Jun 12 07:51
    ppomet commented #2056
  • Jun 12 07:48
    ppomet closed #2056
Ajay Kumar
@ajayak
And best practices related to redux?
Rafael Shemesh
@Rashe
Hi guys.. How can I disable auto refresh webpack dev server?
Antony Stefano
@Antonystefano
Hi guys. Please help me. I have to choose the Angular 2 Framework between Webpack and Cli.
What is the most important things in Webpack?
Why must I choose WebPack? Thank you.
Chaz Gatian
@cgatian
Is there a straightforward way to generate icons (favicons) for your site?
Ajay Kumar
@ajayak

@ajayak
My Angular app structure is getting out of control! I decided to organize by feature. I have a note feature. Inside of note I have

note.module.ts
note.component.ts
note.service.ts
note.model.ts
note.actions.ts
note.reducer.ts
and I have not yet included specs and other ui components that note component will use and I have no idea where to place them!
Anyone have a solution?

Chaz Gatian
@cgatian
@ajayak you could separate the files based off type. We've taken the approach to put all ngrx related content into a folder named store, all http services in http-services, and our models go in models
Joe Gornick
@jgornick
Hey folks, is there a reason why webpack.test.js doesn't include any of the common confirguration?
Chaz Gatian
@cgatian
@jgornick I suspect two reasons:
  • Karma with code coverage isn't as straight forward as you would think to setup. Many configuration options need to be very specific (ie inline-source-maps) in order for it to work corrrectly
  • Testing typically doesn't need all the additional configuration, angular lazy loading, and images.
Rami
@Romstar
Hey can anyone help me with metadata with web pack 2.1.1 ?
the error states that metadata is not a property anymore
what is the replacement if I was using meta data in 2.1.0.beta
Pawel Kondraciuk
@pawelkondraciuk
Hello! Is it possible to use env variables in index.html? I am trying to include google api script but it requires API KEY (different each environment)
Juan Aguilar
@botika
Yes, with html-plugin. Only put your env variables in a global variable with process.env in metadata object and pass this . Like this https://github.com/AngularClass/angular2-webpack-starter/blob/master/config/webpack.common.js#L277
@pawelkondraciuk and this https://nodejs.org/api/process.html#process_process_env for pass your environment variables to node
Pawel Kondraciuk
@pawelkondraciuk
@botika i've tried adding key into metadata (different across environments) but it only uses keys from webpack.common.ts
Dave Bosley
@DBosley
Hello there, all. Is anyone familiar with getting the angular2-webpack-starter project working for github pages?
Dave Bosley
@DBosley

I cloned the repo and ran 2 commands:

npm i
npm run github-deploy:prod

For some reason, I get errors while compiling the ts files. The errors complain that node_modules/typescript/lib/package.json doesn't exist, but I'm pretty sure there isn't supposed to be a package.json there

This message was deleted
here are the errors:
ERROR in ./src/polyfills.browser.ts
Module build failed: Error: Cannot find module 'C:\_Dev\Github\dbosley-info\node_modules\typescript\lib\package.json'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at setupTs (C:\_Dev\Github\dbosley-info\node_modules\awesome-typescript-loader\src\instance.ts:162:29)
    at Object.ensureInstance (C:\_Dev\Github\dbosley-info\node_modules\awesome-typescript-loader\src\instance.ts:84:24)
    at compiler (C:\_Dev\Github\dbosley-info\node_modules\awesome-typescript-loader\src\index.ts:40:22)
    at Object.loader (C:\_Dev\Github\dbosley-info\node_modules\awesome-typescript-loader\src\index.ts:14:18)

ERROR in ./src/main.browser.ts
Module build failed: Error: Cannot find module 'C:\_Dev\Github\dbosley-info\node_modules\typescript\lib\package.json'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at setupTs (C:\_Dev\Github\dbosley-info\node_modules\awesome-typescript-loader\src\instance.ts:162:29)
    at Object.ensureInstance (C:\_Dev\Github\dbosley-info\node_modules\awesome-typescript-loader\src\instance.ts:84:24)
    at compiler (C:\_Dev\Github\dbosley-info\node_modules\awesome-typescript-loader\src\index.ts:40:22)
    at Object.loader (C:\_Dev\Github\dbosley-info\node_modules\awesome-typescript-loader\src\index.ts:14:18)
Dave Bosley
@DBosley
same thing happens with AOT release build
rickszyr
@rickszyr
hey! is it possible that the videos for AngularClass website are not working?
Ryan
@ryansonshine
@rickszyr which videos? if you provide me with a link I can let you know if they're working for me
akbhartomo
@akbhartomo
Hello everybody!
I'm a beginner to learning angular 2, and now i'm starting to use angular2-webpack
akbhartomo
@akbhartomo
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
@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
@akbhartomo Be careful with this command ng init
akbhartomo
@akbhartomo
@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
@akbhartomo Dude ... I just use ng
https://angular.io/docs/ts/latest/cli-quickstart.html
gcbenjamin
@gcbenjamin
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
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
Hello everyone!
Will webpack be updated to webpack2 in this starter kit??
Someone khow this?
vezinadj
@vezinadj
It pretty much already is. The webpack config already uses 'rules'
Max
@maxkarpovets
"webpack": "2.2.0",
It looks that it already uses webpack2
Marthayaputra
@marthayaputra_twitter
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
Is there any similar project to make libraries for angu 2?
akbhartomo
@akbhartomo
@indahouse-aleksandr thank you bro
Vladimir Tolstikov
@bobrosoft

hi there! Can you explain me a little on Webpack 2 and tree-shaking regarding Angular 2 (AngularClass seed is used)? I included @angular/material and using only one component from it atm. Did AoT production build and analyzing it now and I see whole @angular/material is there https://www.dropbox.com/s/30svnjoowxca91o/Screenshot%202017-02-08%2013.35.01.png?raw=1

So, questions is: is webpack's tree-shaking working but just not so intelligent to exclude all unused code? or rollup.js should be used to do proper tree-shaking?

Girish Rathod
@RathodGirish
Hi all,