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
Post a Comment