I have an issue with my website. I have my website created with Node, Express, MongoDB and Angular. This works fine. Now I want to use some JavaScript functions and I have created an external JavaScript file. In Chrome the JavaScript functions work fine, but when I try Mozilla browser or the mobile version of Mozilla, Chrome or Safari it does usually not load my JavaScript file. Sometimes it does. I have tried changing the order of scripts in my jade file and also excluding some other scripts, but can't seem to figure out what the problem is. It is the scripts.js file that does not work.
This is my Jade file that is rendered by Express:
html
head
meta(charset="UTF-8")
meta(name="viewport" content="width=device-width, initial-scale=1.0")
<!-- CSS -->
<!-- load bootstrap & font awesome -->
link(rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css")
link(rel="stylesheet" type="text/css" href="/stylesheets/slick.css")
link(rel="stylesheet" type="text/css" href="/stylesheets/slick-theme.css")
link(rel="stylesheet" href="/stylesheets/font-awesome.css")
link(rel="stylesheet" href="/stylesheets/grid.css")
link(rel="stylesheet" href="/stylesheets/styles.css")
link(rel="stylesheet" href="/stylesheets/nav.css")
link(rel="stylesheet" href="/stylesheets/responsive.css")
link(rel="stylesheet" href="/stylesheets/colors.css")
link(rel="stylesheet" href="/stylesheets/slicknav.css")
<!-- JS -->
<!-- load angular, ngRoute, ngAnimate -->
script(type="application/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.3/angular.min.js")
script(type="application/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.6.3/angular-route.js")
script(type="application/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.6.3/angular-animate.js")
script(type="application/javascript" src="/javascripts/jquery-3.2.0.min.js")
script(type="application/javascript" src="/javascripts/jquery-ui.min.js")
script(type="application/javascript" src="/javascripts/app.js")
script(type="application/javascript" src="/javascripts/controller.js")
script(type="application/javascript" src="/javascripts/jquery.slicknav.min.js")
script(type="application/javascript" src="/javascripts/slick.js")
script(type="application/javascript" src="/javascripts/scripts.js")
base(href="/")
body(ng-app="loodgietersApp" ng-controller="MainCtrl")
div(id="fb-root")
script.
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/nl_NL/sdk.js#xfbml=1&version=v2.8&appId=412123375790390";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
window.___gcfg = {lang: 'nl'};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
div(class="app-container")
div(ng-include="'partials/includes/nav-bar-desktop.html'")
div(class="slider-image")
div(class="call-us")
span(class="phone-icon fa fa-phone fa-3x")
span(class="phonenumber")
span Bel gratis: 0800 - 2400 000
span(class="available")
span 24/7 bereikbaar
div(class="logo")
a(href="/")
img(src="/images/loodgieters-logo.png" alt="loodgieter-logo")
div(ng-include="'partials/includes/nav-bar-mobile.html'")
div(ng-include="'partials/includes/usps.html'")
div(ng-include="'partials/includes/search-plumber.html'")
div(class="box")
div(class="page-animate page" ng-view)
div(ng-include="'partials/includes/twitter-box.html'")
div(class="container")
div(ng-include="'partials/includes/brands.html'")
div(ng-include="'partials/includes/specialisations.html'")
div(ng-include="'partials/includes/footer.html'")
via Larsmanson
No comments:
Post a Comment