vade vade - 1 year ago 81
AngularJS Question

Can I use javascript library codes inside HTML file instead of referencing it?

Is it possible to copy and paste a javascript library's code inside a HTML file?

I asked because I'm trying to make an app that needs angularjs but due to restrictions at work, I cant reference it to an angularjs file externally regardless if its over the internet or intranet.

I appreciate your help.


Answer Source

Yes this is possible but very much not recommended.

This can be done the following way using the <script> tag:

    <p>This is HTML bla bla bla...</p>
<script type="text/javascript">
    //Put your JS code here
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download