Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 09 18:21
    JediSange commented #782
  • Dec 09 16:50
    JediSange commented #782
  • Dec 09 16:50
    JediSange commented #782
  • Dec 05 21:45
    saiMedavarapu commented #1997
  • Nov 07 08:26
    testacp commented #1853
  • Nov 07 08:26
    testacp commented #1853
  • Oct 30 15:24
    emanuelcoelho1986 closed #2011
  • Oct 30 10:43
    sameerpallav commented #2025
  • Oct 15 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
Liyakhat Khan
@liyakhatalikhan

having issue with aot webpack angular4. Cannot read property split of undefined.

package.json

  "dependencies": {
    "@angular/common": "4.1.0",
    "@angular/compiler": "4.1.0",
    "@angular/compiler-cli": "4.1.0",
    "@angular/core": "4.1.0",
    "@angular/forms": "4.1.0",
    "@angular/http": "4.1.0",
    "@angular/platform-browser": "4.1.0",
    "@angular/platform-browser-dynamic": "4.1.0",
    "@angular/platform-server": "4.1.0",
    "@angular/router": "4.1.0",
    "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.25",
    "angular2-cookie": "1.2.6",
    "angular2-pipes": "^1.5.0",
    "angular2-wizard": "^0.3.0",
    "bootstrap": "4.0.0-alpha.6",
    "codelyzer": "^3.0.1",
    "core-js": "2.4.1",
    "express": "^4.15.3",
    "express-history-api-fallback": "^2.2.1",
    "font-awesome": "4.7.0",
    "http-proxy": "^1.16.2",
    "jquery": "3.2.1",
    "ng-jhipster": "0.1.12",
    "ng2-completer": "^1.4.0",
    "ng2-file-upload": "^1.2.1",
    "ng2-webstorage": "1.8.0",
    "ngx-infinite-scroll": "0.4.1",
    "ngx-pipes": "^1.5.10",
    "nodemon": "^1.11.0",
    "prerender-node": "^2.7.1",
    "reflect-metadata": "0.1.10",
    "rxjs": "5.3.0",
    "swagger-ui": "3.0.7",
    "tether": "1.4.0",
    "zone.js": "0.8.9"
  },
  "devDependencies": {
    "@angular/cli": "1.0.0",
    "@angular/compiler-cli": "4.1.0",
    "@types/jasmine": "2.5.47",
    "@types/node": "7.0.12",
    "add-asset-html-webpack-plugin": "2.0.1",
    "angular2-template-loader": "0.6.2",
    "awesome-typescript-loader": "3.1.2",
    "browser-sync": "2.18.8",
    "browser-sync-webpack-plugin": "1.1.4",
    "codelyzer": "3.0.1",
    "copy-webpack-plugin": "4.0.1",
    "css-loader": "0.28.0",
    "del": "2.2.2",
    "event-stream": "3.3.4",
    "exports-loader": "0.6.4",
    "extract-text-webpack-plugin": "2.1.0",
    "generator-jhipster": "4.3.0",
    "generator-jhipster-angular-

Webpack


const webpack = require('webpack');
//var CompressionPlugin = require("compression-webpack-plugin");
const commonConfig = require('./webpack.common.js');
const webpackMerge = require('webpack-merge');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const Visualizer = require('webpack-visualizer-plugin');
const path = require('path');
const ENV = 'prod';
const ngToolsWebpack = require('@ngtools/webpack');


module.exports = webpackMerge(commonConfig({ env: ENV }), {
    devtool: 'source-map',
    entry: {
        'polyfills': './src/main/webapp/app/polyfills',
        'global': './src/main/webapp/content/scss/global.scss',
        'main': './src/main/webapp/app/main-aot'
    },
    resolve: {
        extensions: ['.ts', '.js'],
        modules: ['node_modules']
    },
    output: {
        path: path.resolve('./target/aot'),
        filename: '[hash].[name].bundle.js',
        chunkFilename: '[hash].[id].chunk.js'
    },
    plugins: [
         new ngToolsWebpack.AotPlugin({
              tsConfigPath: './tsconfig-aot.json'
            }),
                new webpack.LoaderOptionsPlugin({
                    minimize: true,
                    debug: false
                }),
                /*new CompressionPlugin({
                    asset: "[path].gz[query]",
                    algorithm: "gzip",
                    test: /\.js$|\.html$/,
                    threshold: 10240,
                    minRatio: 0.8
                }),*/
                new webpack.optimize.UglifyJsPlugin({
                    compress: {
                        warnings: false
                    },
                    output: {
                        comments: false
                    },
                    sourceMap: true
                }),
        new ExtractTextPlugin('[hash].styles.css'),
        new Visualizer({
            // Webpack statistics in target folder
            filename: '../stats.html'
        })
    ],module: {
        loaders: [
            { test: /\.scss$/, loaders: ['raw-loader', 'sass-loader'] },
            { test: /\.css$/, loader: 'raw-loader' },
            { test: /\.html$/, loader: 'raw-loader' },
            { test: /\.ts$/, loaders: ['@ngtools/webpack', 'angular2-template-loader', 'awesome-typescript-loader'] }
          ]
        }
});
Florin Homone
@florinh
I am getting these errors when opening the app: webpackJsonpac_name is not defined
webpackJsonpac__name_.PNG
Carlos Esteban Lopez Jaramillo
@luchillo17
Anyone knows how to tell VSCode and the compiler to grab or detect by themselves the custom-typings.d.ts file in src dir?
Jaroslaw Ivanov
@ivanovjaroslaw
Hello! I trying to use "strict: true" in my tsconfig.json and getting Error while compiling gulpfile.ts file. Can I set it as ignored for some rules from tsconfig? Tried to use "exclude" property and nothing.
bhnbhushanTPL
@bhnbhushanTPL
Hello, I landed on this repo from https://universal.angular.io/quickstart/
But instructions on that page are outdated and I could not get it to work, can anyone please guide me .
I want to create angular 4 universal app with this angular2-webpack-starter seed
Andrey
@tograil
Hi! Fork latest version of starter and got issue with starting it. It is hangs on "Loading" stage without specific reason.
Selvakumar
@Selvakumar1990
check console
Roman
@romaroid
Hi everyone I have an issue with AOT compilation, when I use 'templateUrl' in an app-root component (in the angualr-starter it is 'app' component https://github.com/AngularClass/angular-starter/blob/master/src/app/app.component.ts), I get an error in a browser 'Error: Cannot find primary outlet to load', but if I use - template: '<router-outlet></router-outlet>' everything works fine. Could someone explain, why it doesn't work with 'templateUrl'.
Carlos Eduardo Villalta
@CarlosV89
Hi guys, im getting an error with AOT compilation, maybe someone can help out.
TS2339: Property 'id' does not exist on type 'object[]'.
Dont know what seems to be the problem :/
This message was deleted
Carlos Eduardo Villalta
@CarlosV89
Found the problem, I was declaring the variable as an object[] and that messed up the template, thx anyways
Tim
@timwright35
Question, why is it that when I build production that it does not seem to be making the 0.index.js etc but it does in dev
texirv0203
@texirv0203

i am trying to learn angular2
i read through ngFor documentation but not sure how to display the liArraycontent values.
can you guys tell me how to display it.
providing my code below
http://plnkr.co/edit/8SzOc9GfgzvCBb7Fifvg?p=preview&open=app%2Fapp.component.ts

import { Component } from '@angular/core';

@Component({
selector: 'my-app',
template: <ul class= "master"> <li *ngFor ="let student of liArraycontent"> </li> </ul>
})
export class AppComponent {
name = 'Angular';
liArraycontent = ["testing 1", "testing 2", "testing3"]

}

/
Copyright 2017 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
/

Dan Cancro
@dancancro
@texirv0203 you left out the values from the template. Try this: <li *ngFor ="let student of liArraycontent"> {{student}} </li>
texirv0203
@texirv0203
  • I am new to angular, I am trying to display alert when I click each li.
  • but I am getting an error ncaught TypeError: (t.data || "").search is not a function
  • can you guys tell me how to fix it.
  • providng code below
http://plnkr.co/edit/M05wS03ynxX812u2MATc?p=preview&open=app%2Fapp.component.ts
import { Component } from '@angular/core';

@Component({
  selector: 'my-app',

  styles: [`
    li {
      color: red;
    }
  `],
  template: `<ul class= "master">
                <li *ngFor ="let student of liArraycontent" (click) = "liClicked(this)"> {{student}} </li>
              </ul>`
})
export class AppComponent { 
  name = 'Angular';
  liArraycontent = ["testing 1", "testing 2", "testing3"]
  this.liClicked = function(e1) {
      alert('a');
  }


}


/*
Copyright 2017 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/
Ritwik Banerjee
@ritwbanerjee
only 1 change -> this.liClicked changes to liClicked
@texirv0203
David Gnanasekaran
@davidsekar
main.40bf9a1….bundle.js:1 Uncaught Error: A platform with a different configuration has been created. Please destroy it first.
at d (polyfills.f9cf3d6….bundle.js:1)
at lt (main.40bf9a1….bundle.js:1)
at main.40bf9a1….bundle.js:1
at r (main.40bf9a1….bundle.js:1)
at Object.lWp9 (main.40bf9a1….bundle.js:1)
at e (main.40bf9a1….bundle.js:1)
at +27R (main.40bf9a1….bundle.js:1)
at main.40bf9a1….bundle.js:1
running the AOT build results in following error
Deepak Kanyan
@zap-deepak
Hi all, i am using https://github.com/chymz/ng2-ckeditor but there is a issue when i try to use link it does't give option to set target as blank
https://www.awesomescreenshot.com/image/2570267/55e516ccb1dc382f1b26bac296beb70a
skskumbharkar
@skskumbharkar
Hi all, I am using AngularClass/angular2-webpack-starter; but here facing issue with setting up alias
always get not found exception
trying to setup resolve.alias using
CommonService: helpers.root('src/app/services/')
in webpack.common.js
jai
@jaik1064
Hi all, I am new to angular2 i have small application for online order. for backend API am using front-end angluar product list page i have select option for that selected value change my price and pack weight. after i added to the cart its showing array only not excatly selected value, add to cart click its cloning my product how can i fix this issue
<div *ngIf= "item.product_type === 'C'">
<ion-select>
<div *ngFor="let option of item.option_details" >
<label> {{option.catalogue_product_variant}} </label>
<ion-option Value="option.catalogue_product_variant_option_id"> <!-- Product options list -->
{{option.catalogue_product_variant_option_name}}

</ion-option>
</div>
</ion-select>
<ion-list>
<label>Pack Weight (Kg) : </label><br>
<label>Pack Price : </label>
</ion-list>

</div>
this my html code
addItem(item, Product){
this.productdetails.push(this.productdetails, item);
console.log(item);
}
this my ts file
HamidRad
@HamidRad
Hi friends,I am beginner in angular js 2.I was setup sample project but bootstrap does not work.I install bootstrap by npm and bootstrap folder exists in node_modules but in inspect element says boot strap status 404.I refer it by
<link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.min.css"/>
Deepak Kanyan
@zap-deepak
Hello all
how to create sitemap.xml in angular 2
Max
@maxkarpovets
Hello everyone. I want to save application state. What can I use for it? Is ngRx good solution? Can someone share his knowledge with me?
Lokinder
@lokinderchauhan
Hi @maxkarpovets ngRx is very good solution. It have good code example here https://github.com/ngrx/example-app.
Shailender Singh
@GhatuDB
Hi all
For state management you can use ngrx or MobX
David Nguyen
@thanhnvpt_twitter
hi all
how can i add more flags when typescript compile? I'm getting this errror when build dev "Class 'Subject<T>' incorrectly extends base class 'Observable<T>'.
Types of property 'lift' are incompatible.
Type '<T, R>(operator: Operator<T, R>) => Observable<T>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<R>'.
Type 'Observable<T>' is not assignable to type 'Observable<R>'.
Type 'T' is not assignable to type 'R'."
I just searching and found some suggestion here https://stackoverflow.com/questions/44810195/how-do-i-get-around-this-error-in-rxjs-5-x-in-typescript-2-4. Can anyone give me idea
Kevin Brightwell
@Nava2
@thanhnvpt_twitter the issue is your version of typescript I think
Shot in the dark, could someone a bit more knowlegable take a look at this: https://stackoverflow.com/questions/44834017/karma-and-angular2-mixing-isolated-and-non-isolated-tests-causes-runtime-injec. I'm at a bit of a loss.
bhnbhushanTPL
@bhnbhushanTPL
@thanhnvpt_twitter I had same error, I just updated package.json "typescript": "2.3.4" and did npm install
David Nguyen
@thanhnvpt_twitter
thanks @Nava2 @bhnbhushanTPL
@bhnbhushanTPL currently my tyscript version is 2.4.1, Is it too new?
miillaap
@miillaap
issue: When user copy-paste into text area from windows sticky note, special character like  gets added that's not visible while adding. When downstream system extracts the data, this special char is visible and creates issues while adding extract to powercenter .. I have implemented regex to restrict unwanted chars that seem not to work in this case. Any pointers?
texirv0203
@texirv0203
@all can you tell me how to write test case for the below file
https://jsfiddle.net/ev5c423h/
texirv0203
@texirv0203
  • I am new to angular 2 and I am writing test case.
  • actual functionality code I am providing in fiddle https://jsfiddle.net/ev5c423h/
  • when i add console in the test case its not showing in the terminal.
  • providing my code below
  • can you tell how to fix it
import {ComponentFixture, TestBed, async,fakeAsync,inject} from '@angular/core/testing';
import { BrowserModule } from '@angular/platform-browser';
import {By} from "@angular/platform-browser";
import {DebugElement} from "@angular/core";
import { MockBackend,  MockConnection } from '@angular/http/testing';
import { HttpModule, Http, XHRBackend, Response, ResponseOptions } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import {Component, ElementRef,OnInit,ViewChild} from '@angular/core';
import { SPORTSService } from '../../app/services/sports.service';
import {KendoGridComponent} from '../../app/components/grid/grid.component';


import {Signal} from '../../app/components/financials/finance-dashboard-title';


describe("sports titke search", () => {

  console.log("testing")

  let Component: KendoGridComponent;
  let Fixture: ComponentFixture<KendoGridComponent>;
  let textDebugElement: DebugElement;
  let textElement: HTMLElement;


  beforeEach(async(() => {

    TestBed.configureTestingModule({
          imports: [ HttpModule ],
                  declarations:[KendoGridComponent,ProgressCircle],
                  providers:[DecodeService,SPORTSService,jumpService,saveService,TranslateService,TRANSLATION_PROVIDERS,{ provide: XHRBackend, useClass: MockBackend }]
    }).compileComponents().then(() =>{
    Fixture = TestBed.createComponent(KendoGridComponent);
    Component = Fixture.componentInstance;
      });

  }));

  it("jump criteria search",()=>{
      let data= "{jumpId:0,operationType:search,jumpsDto:null,jumpsSearch:{networks:[1],title:'',titleType:,titleSubType:'',distributorName:'',jumpNumber:'',jumpStatus:'',jumpReference:'',packageName:''}}";
    //let data = "ssoId:&name:&networkNo:1&deptRole:292&status:active&accessNetwork:2&permissionLevelId:1";
    Component._dataSource = new kendo.data.DataSource
    Component.gridSearch("jumps",data,'post');

  });

});
texirv0203
@texirv0203
  • i am new to angular 2 and kendo ui.
  • i am trying to display the pop up using the kendo ui. http://demos.telerik.com/kendo-ui/window/index
  • when i click the common link I need to show a pop up.
  • when i click the link I am calling this function documentsClicked.
  • but in the browser I am not able to see the modal window.
  • in the console also I dont see any errors.
  • providing related code below...other code in the fiddle since no space to paste it here https://jsfiddle.net/9bwdk6xk/
  • can you tell me how to fix it...
 documentsClicked(): void{
    console.log("documentsClicked");

    var myWindow = $(".commonLink");

    myWindow.kendoWindow({
            width: "600px",
            water: "About Alvar Aalto",
            visible: false,
            actions: [
                "Pin",
                "Minimize",
                "Maximize",
                "Close"
            ],
            close: onClose
        }).data("kendoWindow").center().open();
}

 <div class="waterPaperDocInfo">                    
                    <span class="fa fa-file-text-o"></span>
                    <span class="commonLink" (click)="documentsClicked();">&nbsp;{{hat.docsCount}} Documents</span> | Last Modified: {{hat.dateUpdate}} &nbsp;&nbsp;<span class="fa fa-clock-o">9:00 am</span>
            </div>
texirv0203
@texirv0203
  <span class="commonLink" (click)="documentsClicked();">&nbsp;{{hat.docsCount}} Documents</span> | Last Modified: {{hat.dateUpdate}} &nbsp;&nbsp;<span class="fa fa-clock-o">9:00 am</span>
            </div>

            <div id="win1" style="display:none">
                <p>First Window</p>
                <button type="button" id="open2">Open second Window</button>
                    <input type="file" name="batchFile" id="batchFile" title="Select file" />

            </div>


documentsClicked(): void{
    console.log("documentsClicked");

    //var myWindow = $(".commonLink");

    //myWindow.kendoWindow({
    //var myWindow = $(".commonLink");
            //myWindow.kendoWindow({

    $("#win1").show().kendoWindow({
            width: "600px",
            water: "About Alvar Aalto",
            visible: false,
            actions: [
                "Pin",
                "Minimize",
                "Maximize",
                "Close"
            ],
            close: onClose
        }).data("kendoWindow").center().open();
}