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

13th
Mar 2016
Vadim Fedorenko
@meiblorn
Mar 13 2016 00:23
Hello. Does someone have working example with angular2-webpack-starter and ng2-bootstrap ?
Sam Jones
@ollwenjones
Mar 13 2016 03:13
@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
Mar 13 2016 03:32
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
Mar 13 2016 10:46
@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
Mar 13 2016 10:48
i am not using all components
i’ve been using typeahead, and dropdown
Vadim Fedorenko
@meiblorn
Mar 13 2016 10:49
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
Mar 13 2016 13:35

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
Mar 13 2016 19:23
hey, if anyone has any remote remote , designer, DevOps or Sysadmin jobs they can post them at http://webwork.io
Maciej Kowalski
@fkowal
Mar 13 2016 21:28
hmm that is strange