1

I am very new to Angularjs. I have an external java script called client.js. This file has a function

function Client() {
_instance_ = this;
this.client = null;
this.clientType = null;
}

ArcotClient.prototype.setAttribute = function(key, value, value2) {
 if (key.toLowerCase() == "flashupdateurl") {
    if (value != null) {
        this.flashUpdateURL = value;
    }
} else if (key.toLowerCase() == "javainstallurl") {
    if (value != null) {
        this.javaInstallURL = value;
    }
} 
ArcotClient.prototype.getVersion(){

   return version;
}
}

Now in angularjs controller file i want to access the function declared in client.js

var client = new Client();
client.getVersion();

Please help me how to achieve this.

0

1 Answer 1

1

assuming the client.js file is loaded before the controller that is trying to use it, i dont see a problem with doing what you outlined inside the controller function.

If that doesnt work, create a plunker the demonstrates the issue

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.