Giter Club home page Giter Club logo

Comments (16)

Gbuomprisco avatar Gbuomprisco commented on May 30, 2024

HI @FallenRiteMonk, can you please post here which Angular version you're running? This should be working fine with the latest RC3 (and RC1). I know it's going to be deprecated, so I need to change this anyway. Thanks for posting the issue πŸ‘

from ngx-chips.

FallenRiteMonk avatar FallenRiteMonk commented on May 30, 2024

These are my dependencies regarding angular:

    "@angular/common": "2.0.0-rc.3",
    "@angular/compiler": "2.0.0-rc.3",
    "@angular/core": "2.0.0-rc.3",
    "@angular/forms": "0.1.1",
    "@angular/http": "2.0.0-rc.3",
    "@angular/platform-browser": "2.0.0-rc.3",
    "@angular/platform-browser-dynamic": "2.0.0-rc.3",
    "@angular/router": "3.0.0-alpha.7",
    "es6-shim": "0.35.1",
    "reflect-metadata": "0.1.3",
    "rxjs": "5.0.0-beta.6",
    "systemjs": "0.19.31",
    "zone.js": "0.6.12"

If you need anything else or some help, let me know!

from ngx-chips.

Gbuomprisco avatar Gbuomprisco commented on May 30, 2024

Your versions seem correct! The problem is that the ng2-input-tag component is using a deprecated version of ngFormModel. Maybe disaling "@angular/forms" in the short term would work but I don't recommend it.

I'll to update the form to use the new version with @angular/forms. By looking at the documentation, it's not a big change, so will do it soon πŸ‘

from ngx-chips.

FallenRiteMonk avatar FallenRiteMonk commented on May 30, 2024

Thank you! πŸ‘

from ngx-chips.

Gbuomprisco avatar Gbuomprisco commented on May 30, 2024

Opened a PR #13. WIll test and merge

from ngx-chips.

Gbuomprisco avatar Gbuomprisco commented on May 30, 2024

PR merged to master. Version 0.1.1 on NPM should fix the issue πŸ‘

from ngx-chips.

FallenRiteMonk avatar FallenRiteMonk commented on May 30, 2024

I retried it and now i get the following error:

ORIGINAL EXCEPTION: No provider for FormBuilder!
ORIGINAL STACKTRACE:
Error: DI Exception
    at NoProviderError.BaseException [as constructor] (http://localhost:4200/vendor/@angular/core/src/facade/exceptions.js:20:23)
    at NoProviderError.AbstractProviderError [as constructor] (http://localhost:4200/vendor/@angular/core/src/di/reflective_exceptions.js:40:16)
    at new NoProviderError (http://localhost:4200/vendor/@angular/core/src/di/reflective_exceptions.js:77:16)
    at ReflectiveInjector_._throwOrNull (http://localhost:4200/vendor/@angular/core/src/di/reflective_injector.js:777:19)
    at ReflectiveInjector_._getByKeyDefault (http://localhost:4200/vendor/@angular/core/src/di/reflective_injector.js:805:25)
    at ReflectiveInjector_._getByKey (http://localhost:4200/vendor/@angular/core/src/di/reflective_injector.js:768:25)
    at ReflectiveInjector_.get (http://localhost:4200/vendor/@angular/core/src/di/reflective_injector.js:577:21)
    at ElementInjector.get (http://localhost:4200/vendor/@angular/core/src/linker/element_injector.js:23:48)
    at ReflectiveInjector_._getByKeyDefault (http://localhost:4200/vendor/@angular/core/src/di/reflective_injector.js:802:24)
    at ReflectiveInjector_._getByKey (http://localhost:4200/vendor/@angular/core/src/di/reflective_injector.js:768:25)

any ideas what could be the problem now?
Importing FormBuilder doesn't help and I didn't find anything on google!

from ngx-chips.

Gbuomprisco avatar Gbuomprisco commented on May 30, 2024

Hm very strange, didn't encounter this error. Have you configured the app like described in https://github.com/Gbuomprisco/ng2-tag-input#angular-2-configuration-rc3?

from ngx-chips.

FallenRiteMonk avatar FallenRiteMonk commented on May 30, 2024

Yes

from ngx-chips.

Gbuomprisco avatar Gbuomprisco commented on May 30, 2024

Would you mind posting here the bootstrap code? I need a bit of context πŸ‘ I wonder if running the demo works on your end? I can try to mock something up on WebpackBin

from ngx-chips.

FallenRiteMonk avatar FallenRiteMonk commented on May 30, 2024

This would be my main.js:

import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode, provide, PLATFORM_DIRECTIVES } from '@angular/core';
import { LocationStrategy, PathLocationStrategy } from '@angular/common';
import { HTTP_PROVIDERS, Http } from '@angular/http';
import { disableDeprecatedForms, provideForms, REACTIVE_FORM_DIRECTIVES } from '@angular/forms';

import { AuthHttp, AuthConfig } from 'angular2-jwt';

import { WEB_ROUTER_PROVIDERS, WebAppComponent, environment } from './app/';

import 'jquery';
import 'bootstrap';
import 'primeui';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/share';

if (environment.production) {
  enableProdMode();
}

bootstrap(WebAppComponent, [
  HTTP_PROVIDERS,
  provide(AuthHttp, {
    useFactory: (http) => {
      return new AuthHttp(
          new AuthConfig({
            noJwtError: true,  // Make AuthHttp use default http reqest if no token is stored locally
            tokenName: 'id-token'
          }),
          http);
    },
    deps: [Http]
  }),
  WEB_ROUTER_PROVIDERS,
  { provide: LocationStrategy, useClass: PathLocationStrategy },
  disableDeprecatedForms(),
  provideForms(),
  {
        provide: PLATFORM_DIRECTIVES,
        useValue: [REACTIVE_FORM_DIRECTIVES],
        multi: true
  }
]);

Running the demo runs without any problems.

Since I'm using angular-cli I'll try to rebuild a minimal example and commit it to a github repository so you can try! I'll let you know when I got it done and up! In the main wile if you need any more info, just keep asking.

from ngx-chips.

Gbuomprisco avatar Gbuomprisco commented on May 30, 2024

Your config seems just fine. But the minimal example would be much help! :)

from ngx-chips.

FallenRiteMonk avatar FallenRiteMonk commented on May 30, 2024

Here my example: https://github.com/FallenRiteMonk/tagInputExample

Just install angular-cli: npm install -g angular-cli
install the packages: npm install
and serve the application: ng serve
then navigating to localhost:4200 will bring you to the site and display the error!

from ngx-chips.

Gbuomprisco avatar Gbuomprisco commented on May 30, 2024

I didn't include angular forms in the webpack vendors and therefore the error! Try pulling the latest version (0.1.2). :)

from ngx-chips.

FallenRiteMonk avatar FallenRiteMonk commented on May 30, 2024

Works fine now thanks πŸ‘

from ngx-chips.

Gbuomprisco avatar Gbuomprisco commented on May 30, 2024

πŸ‘

from ngx-chips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.