Giter Site home page Giter Site logo

Comments (5)

moizKachwala avatar moizKachwala commented on May 21, 2024

Hi santiim,

There are couple of steps that you need to do for adding a new library support in the project.

  1. do npm install PackageName --save
  2. add entry in systemjs
  3. Add entry in index.html to refer to the copied location.
  4. Also check the gulpfile.js and add the entry if required.

If you face any issue then let me know.

from angular2-express-mongoose-gulp-node-typescript.

santiim avatar santiim commented on May 21, 2024

Thanks moizKachwala for your answer! If I have done all the necessary steps, in other projects I have succeeded without problem, but in this I have not been able to achieve it, I try with several components and there was no case. I think it may be some particularity of this project. One simple to test is:
https://github.com/JiriBalcar/angular2-datepicker
With which I have not been able either.
Have you been able to incorporate any external components to this project?

from angular2-express-mongoose-gulp-node-typescript.

moizKachwala avatar moizKachwala commented on May 21, 2024

I tried D3 charts added in one of my angular project without any problem.

Which library are you trying to add here ? can you give some more details so that I can try adding in this project.

from angular2-express-mongoose-gulp-node-typescript.

santiim avatar santiim commented on May 21, 2024

Hi moizKachwala! and solve the problem, To be able to use angular2-jwt, these were the steps:
In the file gulpfile.TS add the following line:

gulp.task("libs", () => {
    return gulp.src([
        'core-js/client/**',
        'zone.js/dist/zone.js',
        'reflect-metadata/Reflect.js',
        'reflect-metadata/Reflect.js.map',
        'systemjs/dist/system.src.js',
        'angular2-jwt/'

In the systemjs.conf.js:

  var map = {
    'app':                        'app', // 'dist',        
    '@angular':                   (isPublic)? '@angular' : 'node_modules/@angular',
    'rxjs':                       (isPublic)? 'rxjs' : 'node_modules/rxjs',
    'angular2-jwt':               '../libs/angular2-jwt/angular2-jwt.js'    
  };


  var packages = {    
    'app':                        { main: 'main.js',  defaultExtension: 'js' },
    'rxjs':                       { defaultExtension: 'js' },
    'angular2-jwt':               { defaultExtension: 'js' }
  };

Finally I run:

  Npm run build
Npm run deploy

So solve the problem, thank you very much for your patience!

from angular2-express-mongoose-gulp-node-typescript.

moizKachwala avatar moizKachwala commented on May 21, 2024

great :)

from angular2-express-mongoose-gulp-node-typescript.

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.