Contents tagged with AngularJS itnegration

  • How to call method of AngularJS controller outside of AngularJS in javascript

    Hello everybody,

    today I want to write few words about AngularJS and js integration.

    Recently I had opportunity to cowork with one guy, which is great in knowing javascript, but absolutely hates to learn and apply AngularJS. So, I had task in front of me, to give him sone kind of JS object, which he can use in order to execute some method of AngularJS controller.

    So I had some AngularJS controller. 

    here is the fragment of it:

    'use strict';

    var controller = 'toolBoxController';

    angular

        .module('examples')

        .controller(controller, TbController);//register

    Then I've added class ( in terms of javascript ):

    (function (window, undefined) {

        function toolBoxObject() … more