I recently completed my first website, which can be found at
Despite my efforts, I've encountered an issue that has me stumped.
When you navigate to the certificate page, you should be able to input your name onto the certificate. However, if you switch tabs and return to the certificate tab, the ability to enter your name disappears. Instead, you're greeted with {{ name }} in the center, indicating that the angular script isn't functioning properly.
This is the code responsible for implementing the angular script:
UPDATE: I managed to resolve the issue by modifying the index.js file as follows:
$( function() {
$('nav a').on('click', function(e) {
e.preventDefault();
var url = this.href;
$('nav a.current').removeClass('current');
$(this).addClass('current');
$('#content').remove();
$('#container').load(url + " #content").hide().fadeIn('slow'); // Load content with AJAX
if (url.slice(-13) == "practice.html") {
$.getScript("js/practice.js");
$.getScript("js/ui-spinner-behaviour.js");
} else if (url.slice(-16) == "certificate.html") {
$.getScript("js/certificate.js");
$.getScript("js/ui-spinner-behaviour.js");
$('#angular').remove();
$('<script id="angular" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>').insertAfter('section');
} else {
$.getScript("js/repeatPictures.js");
}
});
})
The updated .js file above resolved the issue on the website. You can view the corrected version of the site without any problems by removing the /initial from the end of the URL (I'm restricted to posting only 2 links).
Still, I'm unsure of why this modification fixed the problem!