As I have some bad experiences with the mix of Angular and jQuery, I am trying to avoid jQuery in Angular. Right now, I should add some code to my Angular project but I am not sure how I should convert this. The code is coming from someone else who wants me to implement this in the project.
Within my project I have added all of the required libraries into the index.html. I think this is the only place where a library can be added.
Does someone know (if there is a way) how I can convert those jquery code lines into Angular or javascript code? Where in the project should I add this?
$('head').append( '<meta name="PAGENAME" content="$pagename">' );
$(document).ready(function() {
$.getScript( "https://www.website.com/crsc/scripts/script.js" )
.done(function( script, textStatus ) {
console.log( 'loaded test' );
})
.fail(function( jqxhr, settings, exception ) {
console.log('not loaded');
});
});