angularJS using TypeScript the difference between the following methods -


could please explain difference between 2 methods load controllers,service.... etc

     var appmodule = angular.module("myapp", []);      appmodule.controller("mycontroller", ["$scope", ($scope)       => new application.controllers.mycontroller($scope)]); 

 module todos {       'use strict';    var todomvc = angular.module('todomvc', [])         .controller('todoctrl', todoctrl)         .directive('todoblur', todoblur)         .directive('todofocus', todofocus)         .service('todostorage', todostorage);    } 

the first method dependency injection inline. second method depends on $inject/constructor argument being setup in controller.

suggestion : http://www.youtube.com/watch?v=wdtvn_8k17e&hd=1


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -