Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): add documentation showing how to include bootstrap #3425

Merged
merged 2 commits into from Jan 17, 2017

Conversation

Brocco
Copy link
Contributor

@Brocco Brocco commented Dec 6, 2016

Applies to #2711

@Meet91
Copy link

Meet91 commented Dec 6, 2016

Following this updated doc to integrate Bootstrap with angular-cli results into following module conflicts:

  • jquery.js
  • tether.js

Details errors are as below:

**ERROR in multi scripts
Module not found: Error: Can't resolve 'C:\word\angular-demo\node_modules\jquery\dist\jquery.js' in 'C:\word\angular-demo\node_modules\angular-cli\models'
@ multi scripts

ERROR in multi scripts
Module not found: Error: Can't resolve 'C:\word\angular-demo\node_modules\tether\dist\js\tether.js' in 'C:\word\angular-demo\node_modules\angular-cli\models'
@ multi scripts**

I'm using below configuration:
angular-cli: 1.0.0-beta.20-4
node: 7.1.0(npm-4.0.3)
os: win32 x64
bootstrap : 3.3.7

Any help in this matter would be really appreciated!

Thanks,
Mitesh

@Brocco Brocco requested a review from hansl December 8, 2016 02:36
@filipesilva
Copy link
Contributor

@Meet91 that is because this document shows how to install the current bootstrap version, which is Bootstrap 3, while the readme shows how to install Bootstrap 4.

Copy link
Contributor

@filipesilva filipesilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Brocco if you want to show Bootstrap 3 instead of 4, then we should modify the e2e test accordingly. Or even better, add a new one.

@hansl
Copy link
Contributor

hansl commented Dec 8, 2016

Could you make sure the version is mentionned in the doc?

@Brocco
Copy link
Contributor Author

Brocco commented Dec 14, 2016

Updated to include information for both version 3 and version 4

@hansl
Copy link
Contributor

hansl commented Dec 16, 2016

LGTM. Let's see Filipe's review.

@Brocco
Copy link
Contributor Author

Brocco commented Dec 18, 2016

@filipesilva can you re-review this for me?

@filipesilva
Copy link
Contributor

@Brocco bootstrap4 also needs a couple of scripts as listed in https://github.com/angular/angular-cli#global-library-installation:

"scripts": [
  "../node_modules/jquery/dist/jquery.js",
  "../node_modules/tether/dist/js/tether.js",
  "../node_modules/bootstrap/dist/js/bootstrap.js"
],

I think bootstrap3 also needs jquery and bootstrap.js (but not tether).

@Brocco
Copy link
Contributor Author

Brocco commented Dec 18, 2016

To me, there are different levels of how to utilize bootstrap.

I was just showing how to reference the CSS and not any of the component JS code. There are different ways to handle that from within angular applications. A lot of people don't want to include jQuery or any other libraries and instead do things the "angular way". Because if we show including those scripts then we should also show how to install both ng bootstrap and ng2 bootstrap which I think would be overkill.

@beeman
Copy link
Contributor

beeman commented Jan 8, 2017

I agree with @Brocco that this guide should not include any 3rd-party JS libs. With that being said, it might be good to emphasize that this guide just includes the style, and refer to the various Angular Bootstrap implementations.

@Brocco Brocco merged commit c783968 into angular:master Jan 17, 2017
@Splaktar
Copy link
Member

Splaktar commented Jan 18, 2017

For the latest Bootstrap 4 w/ SCSS, I use the following to get things working:

In styles.scss (other in a file imported into it):

@import '../node_modules/bootstrap/scss/bootstrap';
@import '../node_modules/bootstrap/scss/bootstrap-grid';

This way the SASS loader can do its thing properly and I get good IDE support. Not sure if it's the best way, but thought it might be helpful for those using SCSS.

Update: Thanks Mike for the new PR with SASS info!

MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this pull request Feb 9, 2017
@Brocco Brocco deleted the docs-bootstrap branch February 11, 2017 16:30
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants