chore(use ng2-bootstrap): Unable to integrate ng2-bootstrap with angular2-seed.
My angular2-seed works fine. I added ng2-bootstrap 1.0.0-beta.2 to my code. When i run the code it complains of "Uncaught ReferenceError: require is not defined(anonymous function) @ ng2-bootstrap.ts:1"..
So i installed require.js post which i get error
Uncaught Error: No definition for ./components/accordion/accordion require @ require.js:21(anonymous function) @ ng2-bootstrap.ts:1
Is there a way to fix this?
require present only in demo folder, which builded by webpack and there require is just fine
if you will show me your repo I can say for sure how to fix this
Here is my repo https://github.com/devangvt/ng2-bs2-ch2Sample. Can you please suggest the changes that i should do to get this working. I plan to integrate ng2-charts also in this repo but since i hit a roadblock in bootstrap i did not proceed with ng2-charts.
I will take a look, I suppose in nearest time I will be creating system.js bundles :)
i have created another repo https://github.com/devangvt/ng2withwebpack_bs-ch this one uses webpack.. I am able to use ng2-bootstrap but not ng2-charts. The ng2-charts fail to show, pie chart fails with 0 radius error, Same with doughnut chart, Tired using the bar chart but it does not show up data(but no error).. Any idea what am i doing wrong.
-Devang
On Sun, Jan 17, 2016 at 12:42 AM, Dmitriy Shekhovtsov < [email protected]> wrote:
I will take a look, I suppose in nearest time I will be creating system.js bundles :)
— Reply to this email directly or view it on GitHub https://github.com/valor-software/ng2-bootstrap/issues/82#issuecomment-172247285 .
hm, no error is strange
@valorkin : I have been getting the similar exception *"Uncaught ReferenceError: require is not defined(anonymous function) @ ng2-bootstrap.ts:1".. *
I am referencing only ng2-bootstrap.js in my main index html page. but it has lots of dependency on components. How can we configure our System.js to bundle them easily?
any suggestion??
Usage of system.js bundles in corresponding folder will check. Please read readme.md it has how to section
On Tue, 16 Feb 2016, 14:37 Jeetendrakumar Kumawat [email protected] wrote:
@valorkin https://github.com/valorkin : I have been getting the similar exception *"Uncaught ReferenceError: require is not defined(anonymous function) @ ng2-bootstrap.ts:1".. *
I am referencing only ng2-bootstrap.js in my main index html page. but it has lots of dependency on components. How can we configure our System.js to bundle them easily?
any suggestion??
— Reply to this email directly or view it on GitHub https://github.com/valor-software/ng2-bootstrap/issues/82#issuecomment-184685246 .
@jkumawat how did you solve the problem? I am still getting this...
I don't get this as an issue when trying to use angular2-seed with this, but I get duplicate declarations of the methods in es6-shim for some reason.
@Slavrix clean install typings
working without any problems, check this: https://github.com/valor-software/angular2-webpack-starter/commit/f9a33992fe6555beca49bb19cf410d44fe1542b8
I prefer to use the Quickstart that is referenced on angular.io (since that has a better chance of being kept up to date). I have not been able to get that to work with ng2 yet. Can you provide setup steps? Do I need to add a script tag in the html, or add .map to node_modules in the config, or something else? Thanks.
The documentation is wrong/misleading. For the angular2-seed project, you don't need to import
<script src="node_modules/ng2-bootstrap/bundles/ng2-bootstrap.min.js"></script>
The seed project will deal with imports for you instead.
Documentation is not wrong, but I should make it bold
that <script src="node_modules/ng2-bootstrap/bundles/ng2-bootstrap.min.js"></script>
required only for quickstarters (system.js)
The documentation is so outdated in many places ng2-bootstrap.min.js doesn't even exist anymore.
This is not uptodate. If you are using angular2-quickstart , please use https://github.com/valor-software/angular2-quickstart/blob/master/systemjs.config.js