I'm new in angularJs, i have javascript which contains to load the applet.
that is working in javascript but when I'm putting same code in angularJs, that is not compiling, my script is not executing, for that i wrote a custom directive, but that is giving error **SyntaxError: missing : after property id**.

**Java Script:**

```
<div id="appletbox" class="photobox">
    <script src="https://www.java.com/js/deployJava.js"></script>
    <script>
        var attributes = {
            id: "fingerCaptureApplet",
            width: 140,
            height: 140
        };
        var parameters = {
            jnlp_href: "fca/finger-capture-applet.jnlp"
        };
        deployJava.runApplet(attributes, parameters, '1.7');
    </script>
</div>

```

**Custom Directive Code:**

```
angular.module('some', ['ngRoute'])
.directive('fingerScanner', function() {
        return {
            var attributes = {
                id: "fingerCaptureApplet",
                width: 140,
                height: 140
            };
            var parameters = {
                jnlp_href: "fca/finger-capture-applet.jnlp"
            };
            deployJava.runApplet(attributes, parameters, '1.7');
        };
    });

```

using that directive is like below:

```
<div finger-scanner/>

```

please whether I'm doing right way or anything wrong.
Thanks.

![enter image description here](https://i.stack.imgur.com/oFCvx.png)