A JavaScript controller with componentController.js as it's name will consist of JavaScript functions that will invoke client side functions. JavaScript controllers are kept simple and are used to call reusable JavaScript functions written in cmphelper.js. A simple componentController.js would look as follows:
({
init: function(component, event, helper){
helper.helperfunction(component, event);
},
navigation : function(component, event, helper) {
//Find the text value of the component with
aura:id set to "address"
var address = component.get("v.linkaddress");
var urlEvent = $A.get("e.force:navigateToURL");
urlEvent.setParams({
"url": address,
"isredirect" :false
});
urlEvent.fire();
},
})