Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 23 2020 00:49
    qdouble removed as member
  • Feb 23 2020 00:49
    govi2010 removed as member
  • Feb 23 2020 00:49
    lanovoy removed as member
  • Feb 23 2020 00:49
    d3viant0ne removed as member
  • Feb 23 2020 00:49
    shlomiassaf removed as member
  • Feb 23 2020 00:49
    mastertinner removed as member
  • Feb 23 2020 00:49
    colinskow removed as member
  • Feb 23 2020 00:49
    matthewdenobrega removed as member
  • Feb 23 2020 00:49
    dotcs removed as member
  • Feb 23 2020 00:49
    DanWahlin removed as member
  • Feb 23 2020 00:49
    Foxandxss removed as member
  • Feb 23 2020 00:49
    niieani removed as member
  • Feb 23 2020 00:49
    katallaxie removed as member
  • Feb 23 2020 00:49
    kentcdodds removed as member
  • Feb 23 2020 00:49
    jeffbcross removed as member
  • Feb 23 2020 00:49
    jimthedev removed as member
  • Feb 23 2020 00:49
    carlosliu removed as member
  • Feb 23 2020 00:41
    PatrickJS commented #1686
  • Feb 22 2020 22:23
    kamil-kielczewski commented #1686
  • Feb 22 2020 22:23
    kamil-kielczewski commented #1686
Sam Jones
@ollwenjones
@matthieu-D you need to look at the arguments passed into the webpack-dev-servernpm scripts in the package.json
Sam Jones
@ollwenjones
@arozwalak heads up because I burned a lot of time missing this: require.ensure blocks are crawled by webpack essentially 'compile time' - so they have to exist ahead of anything that happens at runtime. Also, you might have to look up a type definition for webpack require. There's some instructions near the bottom here: https://github.com/TypeStrong/ts-loader
Vadim Fedorenko
@meiblorn
Guys, hello.
When I use [(ngModel)] in my templates I am getting the 'No value accessor for '' in [null]' error. Here is example: http://plnkr.co/edit/BUvGjFhgpxoe5k2UyjWe?p=preview . How to fix?
To see error just open debug pane
I get this error only in production mode. In debug mode it works well
sorry, 'development' mode
Sam Jones
@ollwenjones
@meiblorn that plunk is using alpha.39... are you building in alpha.39?
Vadim Fedorenko
@meiblorn
No, it was just for example to show error. Look here: https://github.com/AngularClass/angular2-webpack-starter/blob/master/src/app/home/home.html . If I use [(ngModel)] directive instead of [value]="data.value" (input)="data.value = $event.target.value" I get such error after html minification
If not — it works perfectly
I guess, problem can be here ...
customAttrSurround: [[/#/, /(?:)/], [/\*/, /(?:)/], [/\[?\(?/, /(?:)/]], customAttrAssign: [/\)?\]?=/]
Vadim Fedorenko
@meiblorn
I've created an issue: AngularClass/angular2-webpack-starter#415
Vadim Fedorenko
@meiblorn
Hello. Does someone have working example with angular2-webpack-starter and ng2-bootstrap ?
Sam Jones
@ollwenjones
@meiblorn the "minificatin" might be the real issue with your ngModel. I didn't think minification was working since beta.0
Tai T. Truong
@truthtaicom
I have a error: ORIGINAL EXCEPTION: Primary outlet is already registered.. My app.ts :
/*
 * Angular 2 decorators and services
 */
import {Component} from 'angular2/core';
import {RouteConfig} from 'angular2/router';
// import {FORM_PROVIDERS} from 'angular2/common';

// import {RouterActive} from './directives/router-active';
// import {HeaderComponent} from './header/header';
import {FooterComponent} from './footer/footer';

import {Home} from './home/home';
// import {Admin} from './admin/admin';

/*
 * App Component
 * Top Level Component
 */
@Component({
  selector: 'app',
  // providers: [...FORM_PROVIDERS],
  directives: [FooterComponent],
  pipes: [],
  styles: [`
    main {
      font-size: 1rem;
      line-height: 1.5;
      color: #666;
      background-color: #ededed;
    }
    :global(body) {
      color: #666;
      background-color: #ededed;
    }
  `],
  template: `
    <main>
      <header>
      <nav>
        <h1>Hello</h1>
      </nav>
    </header>
    <router-outlet></router-outlet>
    <footer-component></footer-component>
    </main>
  `
})
@RouteConfig([
  { path: '/', component: Home, name: 'Index', useAsDefault: true },
  { path: '/home', component: Home, name: 'Home' },

])


export class App {

  constructor() {

  }
}
Vadim Fedorenko
@meiblorn
@fl
@fkowal, does templates work? For example, Alert?
@fkowal , I am not able to use Alert as Directive. Do you know how to fix it?
Maciej Kowalski
@fkowal
i am not using all components
i’ve been using typeahead, and dropdown
Vadim Fedorenko
@meiblorn
I don't see any changes in templates in your commits history
It could be useful, because I am getting No Directive annotation found on Alert error when write like so directives: [Alert]
Vadim Fedorenko
@meiblorn

Here's a little example:

app.component.ts

import {Alert} from 'ng2-bootstrap/ng2-bootstrap';

@Component({
    selector: 'app',
    providers: [],
    directives: [Alert],
    pipes: [],
    styles: [require('./app.component.scss')],
    template: require('./app.component.html')
})
export class App  {

Alert component

@Component({
  selector: 'alert',
  directives: [NgIf, NgClass],
  template: ALERT_TEMPLATE
})
export class Alert implements OnInit {
.....

Browser logs:

browser_adapter.js:76 EXCEPTION: No Directive annotation found on Alert

Env: angular2-webpack-starter & ng2-bootstrap.

nodecraic
@webworkio
hey, if anyone has any remote remote , designer, DevOps or Sysadmin jobs they can post them at http://webwork.io
Maciej Kowalski
@fkowal
hmm that is strange
Hsinchang
@mkjeff
ng2-bootstrap need to upgrade to ng2 beta.9. Currently, I use local source files of ng2-bootstrap, waiting for npm update. seem like typescript emit different annotation meta?
Stanislav Kiryukhin
@KorsaR-ZN
Hi, please tell me how to include the CSS file from the node_modules
Sam Jones
@ollwenjones
@meiblorn in another library, we keep bumping into the 'No Directive annotation found' error, and it's almost always an angular version conflict between the project and a dependency. See schippie's explanation https://github.com/justindujardin/ng2-material/issues/38#issuecomment-195772602
looks like someone answered the SO question correctly though.
Aleš
@fxck
anyone used lodash along webpack?
Sam Jones
@ollwenjones
yes

I have in vendor.js

import 'lodash';

in my service:

import * as _ from 'lodash';
not confident the former is necessary to make it work, but it should ensure that lodash gets bundled in vendor.js instead of main.js
also had to install typings for it
Sam Jones
@ollwenjones
in typings.json ambientDependencies
"lodash": "github:DefinitelyTyped/DefinitelyTyped/lodash/lodash.d.ts"
Aleš
@fxck
ok @ollwenjones and what if you wanted to import only one function, say lodash/merge

import ‘lodash'; does not complain, and _.merge is there

import ‘lodash/merge'; does not complain, but _.merge is not there

import merge from ‘lodash/merge'; complains that Cannot find module 'lodash/merge’, same with import { merge } or import * as merge

Sam Jones
@ollwenjones
ah, that is trickier... I'm not pro at TypeScript imports... I wonder if there are some examples in this starter for RxJS though... just a sec.
Aleš
@fxck
here it works https://github.com/reactjs/redux/blob/master/examples/real-world/reducers/index.js#L2 but they are using babel, not typescript
Sam Jones
@ollwenjones
seems like the version of lodash they are importing would have to have some exported member 'merge' at that location.
sorry once again I know just enough to be not very helpful
I would have guessed import * as merge from 'lodash/merge' would have worked... except you don't want a bare object merge you want _.merge
is lodash/merge the actual location in node_modules? doesn't seem to be in my case
yes it is, nevermind
Sam Jones
@ollwenjones
and it even has module.exports = merge;
Aleš
@fxck
yea
it should work
Sam Jones
@ollwenjones
I wonder if it's a bug in the ts-loader?
mine Cannot find module 'lodash/merge'.