I have a component with a function inside:
app.component("myComponent", {
templateUrl: "myComponent.html",
controller: function() {
this.addApp = function (arg) {
console.log(arg);
};
}
})
I would like to operate that function from outside the component:
<my-component>
</my-component>
<button type="button" ng-click="something.addApp('Cheese')"
class="btn-sm btn-default no-modal" >
Add Application
</button>
How to do that?
See Question&Answers more detail:os