Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
ikran p
Courses Plus Student 2,659 Pointshow to publish the foundation for apps project on live server
foundation for apps
2 Answers
Iain Simmons
Treehouse Moderator 32,305 PointsAfter you've installed Foundation for Apps and run/built it, there should be a build folder containing the final files, ready to be uploaded to a web server (should just be HTML, CSS, JS and other files like images/fonts).
How you upload the files will depend on the server.
ikran p
Courses Plus Student 2,659 Points<!doctype html>
<html lang="en" ng-app="application">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation for Apps</title>
<link href="./assets/css/app.css" rel="stylesheet" type="text/css">
<script src="./assets/js/foundation.js"></script>
<script src="./assets/js/templates.js"></script>
<script src="./assets/js/routes.js"></script>
<script src="./assets/js/app.js"></script>
</head>
<body>
<div class="grid-frame vertical">
<div class="grid-block wrap shrink" style="padding: 0;">
<div class="grid-content collapse medium-5 small-12">
<ul class="primary menu-bar">
<li ui-sref-active="is-active"><a ui-sref="home"><strong>trekker</strong></a></li>
</ul>
</div>
<div class="grid-content collapse medium-7 small-12">
<ul class="primary menu-bar">
<li ui-sref-active="is-active"><a ui-sref="trails"><strong>trails</strong></a></li>
<li ui-sref-active="is-active"><a ui-sref="about"><strong>about</strong></a></li>
<li ui-sref-active="is-active"><a ui-sref="contact"><strong>contact</strong></a></li>
</ul>
</div>
</div>
<div class="grid-block">
<div ui-view class="grid-content"></div>
</div>
</div>
</body>
</html>
Iain Simmons
Treehouse Moderator 32,305 PointsIt's probably a JavaScript issue then. Can you share the code in templates.js, routes.js and app.js?
Also, when you paste the code in, please put it in code blocks by adding three backticks (`) before and after, as well as a blank line on the outside of that, and the programming language directly after the first set of backticks, like so:
some normal text
```js
// your JavaScript code
var someVariable;
function someFunc() {
// more code;
}
```
some more normal text
ikran p
Courses Plus Student 2,659 Pointsikran p
Courses Plus Student 2,659 PointsThank you for the reply.
I tried that one. But the ui-view sections( main app content ) are not showing up.
Did you get same problem?
Iain Simmons
Treehouse Moderator 32,305 PointsIain Simmons
Treehouse Moderator 32,305 PointsNo, sorry I haven't actually done this, I just checked the documentation.
Can you share your code and we'll see if there's something else that is causing the issue?