Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 15:20
    alanhg commented #1997
  • Sep 30 15:12
    bbrink68 commented #2049
  • 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
gakam clovis
header {
height: 20vh;
background-image: url("../assets/images/lbg.jpg") ;
but don't know why webpack don't take the image during the building process
this is content of my webpack configuration file
gakam clovis
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var helpers = require('./helpers');

module.exports = {
  entry: {
    'polyfills': './src/polyfills.ts',
    'vendor': './src/vendor.ts',
    'app': './src/main.ts'

  resolve: {
    extensions: ['.ts', '.js']

  module: {
    rules: [
        test: /\.ts$/,
        loaders: [
            loader: 'awesome-typescript-loader',
            options: { configFileName: helpers.root('src', 'tsconfig.json') }
          } , 'angular2-template-loader'
        test: /\.html$/,
        loader: 'html-loader'
        test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
        loader: 'file-loader?name=assets/img/[name].[hash].[ext]'
        test: /\.css$/,
        exclude: helpers.root('src', 'app'),
        loader: ExtractTextPlugin.extract({ fallback: 'style-loader', loader: 'css-loader?sourceMap' })
        test: /\.css$/,
        include: helpers.root('src', 'app'),
        loader: 'raw-loader'

  plugins: [
    // Workaround for angular/angular#11580
    new webpack.ContextReplacementPlugin(
      // The (\\|\/) piece accounts for path separators in *nix and Windows
      helpers.root('./src'), // location of your src
      {} // a map of your routes

    new webpack.optimize.CommonsChunkPlugin({
      name: ['app', 'vendor', 'polyfills']

    new HtmlWebpackPlugin({
      template: 'src/index.html'
Girish Rathod
I am using angular2-google-maps. That is not compatible with AOT.
May I get the solution. I want to reduce my bundle.js file.
I am using this command.
  ng build --prod --aot
Is there any anyway to call typescript function from a external javascript
Sarath DR
hi is it possible to increase TCP read timeout with angular2 http request
something we set for xhr.timeout = 1000
Anyone having these test errors now: AngularClass/angular2-webpack-starter#1628 ?
Alexander B.
How to add PrimeNG (or other package) to the project?
Alexander B.
Alexander B.
I've done npm install --save primeng
But when I try to use any component, getting error: Error: Template parse errors: 'p-accordionTab' is not a known element: 1. If 'p-accordionTab' is an Angular component, then verify that it is part of this module.
NIkunj Baid
hey . I am unable to run ng generate component name . The error is : Unable to read property '0' of undefined. I am using @angular/cli@latest . OS: Windows 8.1 Angular 6.9.0 . npm :3.10.10 . Please help.
Forrest Murray
how to I get more descriptive stack traces? It seems like the dll is obscuring a lot
EXCEPTION: Uncaught (in promise): Error: Error in ./ProductComponent class ProductComponent - inline template:62:13 caused by: Cannot read property '0' of undefined
Error: Error in ./ProductComponent class ProductComponent - inline template:62:13 caused by: Cannot read property '0' of undefined
    at ViewWrappedError.ZoneAwareError (http://localhost:3000/polyfills.dll.js:4731:33)
    at ViewWrappedError.BaseError [as constructor] (http://localhost:3000/vendor.dll.js:28595:16)
    at ViewWrappedError.WrappedError [as constructor] (http://localhost:3000/vendor.dll.js:28660:16)
    at new ViewWrappedError (http://localhost:3000/vendor.dll.js:58640:16)
    at CompiledTemplate.proxyViewClass.DebugAppView._rethrowWithContext (http://localhost:3000/vendor.dll.js:80035:23)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (http://localhost:3000/vendor.dll.js:80008:18)
    at CompiledTemplate.proxyViewClass.AppView.internalDetectChanges (http://localhost:3000/vendor.dll.js:79795:18)
    at CompiledTemplate.proxyViewClass.View_ProductComponent_Host0.detectChangesInternal (/AppModule/ProductComponent/host.ngfactory.js:29:19)
    at CompiledTemplate.proxyViewClass.AppView.detectChanges (http://localhost:3000/vendor.dll.js:79810:14)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (http://localhost:3000/vendor.dll.js:80005:44)
    at ViewRef_.detectChanges (http://localhost:3000/vendor.dll.js:59572:20)
    at RouterOutlet.activate (http://localhost:3000/vendor.dll.js:65112:42)
    at ActivateRoutes.placeComponentIntoOutlet (http://localhost:3000/vendor.dll.js:23665:16)
    at ActivateRoutes.activateRoutes (http://localhost:3000/vendor.dll.js:23632:26)
    at http://localhost:3000/vendor.dll.js:23568:58
    at Array.forEach (native)
    at ActivateRoutes.activateChildRoutes (http://localhost:3000/vendor.dll.js:23568:29)
    at ActivateRoutes.activate (http://localhost:3000/vendor.dll.js:23542:14)
    at http://localhost:3000/vendor.dll.js:23110:22
    at SafeSubscriber._next (http://localhost:3000/vendor.dll.js:171:21)
    at SafeSubscriber.__tryOrSetError (http://localhost:3000/vendor.dll.js:600:16)
    at SafeSubscriber.next (http://localhost:3000/vendor.dll.js:542:27)
    at Subscriber._next (http://localhost:3000/vendor.dll.js:493:26)
    at Subscriber.next (http://localhost:3000/vendor.dll.js:457:18)
Hello there

i am using angular in memory web api package on my project that build based on angular2 webpack starter,

i am using lazy loading for each submodules, i realized that every submodule will be loaded when the app is navigating somewhere..
the problem is, i import my angular in memory web api inside the submodule, to use the mockup API..
after i saved the data on mockup API, its working.. but when i navigate to somewhere else, the data will be reset (I think this is because we reload submodule again)..

For example:
I am going to update User, i am doing PUT 'api/users/5';
if i am not redirect to anywhere, the data will be keep..

but when i am going to navigate to list of user GET 'api/users';
the data will be reset because the module will be reload again..

FYI, update user form and list of user view is in a same module, why it load twice ? should be once right ?

Hello, I'm wondering what's the best practice for the following scenario: I'd like to use the zxcvbn library in my ng2-webpack-starter app. (zxcvbn is a password-strengh js library distributed via npm, there's also the TypeScript def file for it on github somewhere). Thing is, as the library is several 00s kbytes in size and should be used from a minimal set of pages in the application, I'd like to load it dynamically and not bundle it with the whole app via webpack. Is there a recommended method of accomplishing this? Much obliged & thanks
Does anyone know why my styles are not being applied? I can see the exports.push section in main.bundle.js that contains all the compiled styles from my sass files. This includes bootstrap, but basic classes like row do not have any bootstrap styles applied. I'm using the default loader configuration that comes with the started project.
I have import 'assets/sass/app.scss'; added to main.browser.ts.
after I run "npm run build:docker" and the image is ready locally, what shpuld I do next?
having a lot of trouble getting some 3p libraries into an app here here ... for instance moment.js :
it provides it's own typings but any import / require I try doesn't get it defined in the app.
where it seems I can just do import {MomentModule} from 'angular2-moment'; ... which doesn't raise any errors, but, MomentModule is still not defined ...
anyone use moment, or have any pointers on how to import a module like this?
Forrest Murray
@alexanderbelko did you add primeeng to your app.module ?
@perrierism where is MomentModule not defined?
@donald-slagle are you trying to load global styles?
@alisherabd what are you trying to accomplish with your docker image?
I am using this starter kit trying to read a simple json file from a service...it throws 404
can anyone help?
export class MyService {

  public data:any;

  constructor(private http:Http) {
      .subscribe(res => this.data = res.json());
Forrest Murray
@webdev where are you using the service? did you add it to the providers?
yes all of that is fine... obviously i am consuming it in a component

  selector: 'home',  // <home></home>
  providers: [
  styleUrls: [ './home.component.css' ],
  templateUrl: './home.component.html'
export class HomeComponent implements OnInit {

  // TypeScript public modifiers
    public myService: MyService
  ) {

Forrest Murray
Is that all the code? \
You need to use @Injectable decorator I believe
im using that as well on the service
Forrest Murray
.subscribe(res => this.data = res.json().data)
already doing that in the service if you look above ^^ and it does not need .data in the end
its a 404 dude EXCEPTION: Response with status: 404 Not Found for URL: http://localhost:4000/data/settings.json
Carlos Esteban Lopez Jaramillo
Anyone can explain me what does this do in webpack config?
// Fix Angular 2
      new NormalModuleReplacementPlugin(
      new NormalModuleReplacementPlugin(
      new NormalModuleReplacementPlugin(
      new NormalModuleReplacementPlugin(
      new NormalModuleReplacementPlugin(
Carlos Esteban Lopez Jaramillo
Ok seems nobody will answer the last one, how about this one, i've tested the AoT with @ngtools/webpack and it looks simpler than the one used in this repo at this moment, is there any good reason to stick with ngc-webpack?