Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Bootstrap not working in template #1117

Closed
DickvdBrink opened this issue Jul 14, 2017 · 2 comments
Closed

Bootstrap not working in template #1117

DickvdBrink opened this issue Jul 14, 2017 · 2 comments

Comments

@DickvdBrink
Copy link

DickvdBrink commented Jul 14, 2017

After running yo aspnetcore-spa I chose angular and executing dotnet restore && dotnet run I try to open the url in the browser. Everything is looking good (style and stuff) but the bootstrap menu isn't working, if you make the page small you get the hamburger menu but it doesn't open on a click.
When you add the following code

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

to the html it starts to work again, so i suspect something is wrong with the bundle and the bootstrap javascript isn't executed

@SteveSandersonMS
Copy link
Member

The version of the templates on Yeoman was missing this line. If you add it to your boot-client.ts file, things should be working as expected.

This is already fixed in the sources in this repo, hence closing as resolved.

@stibay
Copy link

stibay commented Aug 1, 2017

This is still the issue in angular template from dotnet new so this issue should be open.
import 'bootstrap'; needs to be added to boot-client-ts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants