Code Monkey home page Code Monkey logo

Comments (5)

tinesoft avatar tinesoft commented on June 12, 2024

Hi,

I need more info about your setup, as it seems not to be a regular angular cli, nor SystemJS project...

You need to install both 'ngx-cookieconsent' and 'cookieconsent' package , and they must be referenced somehow in your main 'index.html'.

from ngx-cookieconsent.

GetTaxSolutions avatar GetTaxSolutions commented on June 12, 2024

This is the base project configuration which I'm trying to add this component:

https://github.com/MarkPieszak/aspnetcore-angular2-universal

I added both packages. I can see the menu but have to copy manually both files in wwwroot/assets and point to this virtual path. But I don't like this solution. May be have better way to be done.

from ngx-cookieconsent.

tinesoft avatar tinesoft commented on June 12, 2024

I had a look at the starter you mentioned.
Indeed you shouldn't copy any files manually in 'wwwroot' : this is the job of the build system.

I don't particularly know this starter well, but from what I can tell, after you installed the packages, you must referenced them in the webpack.config.vendor.js so that they're integrated in final bundles:

const treeShakableModules = [
    '@angular/animations',
    '@angular/common',
    '@angular/compiler',
    '@angular/core',
    '@angular/forms',
    '@angular/http',
    '@angular/platform-browser',
    '@angular/platform-browser-dynamic',
    '@angular/router',
    'ngx-bootstrap',
    'zone.js',
    'ngx-cookieconsent',
    'cookieconsent/build/cookieconsent.min.js'
];
const nonTreeShakableModules = [
    // 'bootstrap',
    // 'bootstrap/dist/css/bootstrap.css',
    'core-js',
    // 'es6-promise',
    // 'es6-shim',
    'event-source-polyfill',
    // 'jquery',
    'cookieconsent/build/cookieconsent.min.css'
];

from ngx-cookieconsent.

GetTaxSolutions avatar GetTaxSolutions commented on June 12, 2024

This is a good advice. I added them and found solution with some changes in webpack.config
Thank you

from ngx-cookieconsent.

sandroverna avatar sandroverna commented on June 12, 2024

This is a good advice. I added them and found solution with some changes in webpack.config
Thank you

hi GetTaxSolutions,
Is it possible to describe the solution found in this discussion?
so it can also be applied by others who have encountered the same problem.
thank you

from ngx-cookieconsent.

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.