Coder Social home page Coder Social logo

Comments (14)

dschoeni avatar dschoeni commented on May 22, 2024

Edit: Correction ;(

Installation worked good for me.

> [email protected] postinstall PATH\node_modules\ng2-formly      
> typings install                                                                                                                                                                              

[email protected] node_modules\ng2-formly                                                           
├── [email protected]                                                                                
└── [email protected]                                                                                       

But there are not *.ts.d files in the npm package, thus I have no typedefs to work with in my project. This is pretty major unfortunately.

from ngx-formly.

mohammedzamakhan avatar mohammedzamakhan commented on May 22, 2024

@micouz Can you take a look into this

from ngx-formly.

couzic avatar couzic commented on May 22, 2024

Sorry guys, a couple of things went wrong. I believe it should be fixed with this new PR.

from ngx-formly.

couzic avatar couzic commented on May 22, 2024

@mohammedzamakhan Could you publish a new version ? Latest is still beta.3

from ngx-formly.

mohammedzamakhan avatar mohammedzamakhan commented on May 22, 2024

@micouz Done

from ngx-formly.

dschoeni avatar dschoeni commented on May 22, 2024

This hasn't worked as it should've guys:

After installing the module, there is more or less everything important missing. I can check out the repo, build it and use it with relative paths, but not with npm.

node_modules\ng2-formly
λ ls -l
total 24
-rw-r--r-- 1 usr 197609  1096 May 28 18:10 LICENSE
-rw-r--r-- 1 usr 197609  4521 May 28 18:10 README.md
drwxr-xr-x 1 usr 197609     0 May 28 18:10 node_modules/
-rw-r--r-- 1 usr 197609 10013 May 28 18:10 package.json

from ngx-formly.

couzic avatar couzic commented on May 22, 2024

@dschoeni can you make sure you got the beta.4 version ?

Here's what I got:

➜  ng2-formly ls -l
total 28
drwxr-xr-x 2 mikael mikael 4096 mai   29 13:32 bundles
drwxr-xr-x 5 mikael mikael 4096 mai   29 13:32 lib
-rw-r--r-- 1 mikael mikael 1096 mai   11 23:21 LICENSE
-rw-r--r-- 1 mikael mikael 5066 mai   29 13:32 package.json
-rw-r--r-- 1 mikael mikael 4521 mai   11 23:21 README.md

from ngx-formly.

dschoeni avatar dschoeni commented on May 22, 2024

No idea what happened, but another clean & reinstall using npm fixed it. I had the beta.4 version specified in my package.json. Welp, NPM caching goodness I guess.

Thanks for the great work and your quick response!

from ngx-formly.

mohammedzamakhan avatar mohammedzamakhan commented on May 22, 2024

@micouz how do you import components? Through systemjs, I have to do, for it to work

import {FormlyConfig, TemplateDirectives, FormlyForm, FormlyEventEmitter} from 'index';

Shouldn't that be

import {FormlyConfig, TemplateDirectives, FormlyForm, FormlyEventEmitter} from 'ng2-formly/index';

Example Plnkr http://plnkr.co/edit/yMuYFdBbfhAmB0HTROBk?p=preview

from ngx-formly.

matthieubouvier avatar matthieubouvier commented on May 22, 2024

I have 2 problems with transpilation:

  • I think the ng2-formly.d.ts file (and all .d.ts files) has to be in ng2-formly directory and not in ng2-formly/bundles.
  • After copying ng2-formly.d.ts file and using import { FormlyProviders } from 'ng2-formly/ng2-formly';, I got the error:
[gulp-tslint] error app/app.component.ts[14, 10]: unused variable: 'FormlyProviders'
sources/app/app.component.ts(14,33): error TS2306: File '/***/node_modules/ng2-formly/ng2-formly.d.ts' is not a module.

from ngx-formly.

couzic avatar couzic commented on May 22, 2024

@mohammedzamakhan I'm not very good with System.js (I'm more a WebPack user), but I think some things are missing from your config.js file. Something like:
map: { 'ng2-formly': 'https://cdnjs.cloudflare.com/ajax/libs/ng2-formly/2.0.0-beta.4' },
and:
packages: { 'ng2-formly': { main: 'ng2-formly.js', defaultExtension: 'js' } }

from ngx-formly.

couzic avatar couzic commented on May 22, 2024

@matthieubouvierthales The bundles folder is used for CDN publication. In other cases, you will import the code from the lib folder.
When importing from the project, you should use:
import { FormlyProviders } from 'ng2-formly

from ngx-formly.

matthieubouvier avatar matthieubouvier commented on May 22, 2024

@micouz You're right, we have to import with import { FormlyProviders } from 'ng2-formly' and not with import { FormlyProviders } from 'ng2-formly/ng2-formly' like documented ont the main page.

Thanks for your work and your response !

from ngx-formly.

couzic avatar couzic commented on May 22, 2024

@matthieubouvierthales Yes you're right, we changed the build system but not the documentation yet. I'm putting it on my todo list !

from ngx-formly.

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.