dotnetrockz Posted April 7, 2015 Report Posted April 7, 2015 haha..i was about to ask abt angular which has inbuilt dependency injection..emanna idea undha ani yes angular konchem idea undhi...basic ga angular is one of those databinding frameworks which is tightly coupled to the view.....i.e its like a mvc approach on the client side...... dependency injection angular lo staright forward untadhi like see this line of code angular.module('scopeExample', []).controller('MyController', ['$scope', function($scope) {$scope.username = 'World';$scope.sayHello = function() {$scope.greeting = 'Hello ' + $scope.username + '!';};}]); indhulo u r 'injecting' $scope object to 'Mycontroller'...ikkada 'Mycontroller' is the one thing that's bound to the view and it contains the bussiness logic...so nee view lo u can access this '$scope' object properties like username...and like u can see methods and functions are assigned to this $scope object which can be called in the view...... in simple terms mycontroller has dependencies on $scope object ......ala chala dependencies ni inject cheyyachu
Osama Bin Gandhi Posted April 7, 2015 Report Posted April 7, 2015 Ok cool...Got it and the use of this is to avoid multiple implementations? yes angular konchem idea undhi...basic ga angular is one of those databinding frameworks which is tightly coupled to the view.....i.e its like a mvc approach on the client side...... dependency injection angular lo staright forward untadhi like see this line of code angular.module('scopeExample', []).controller('MyController', ['$scope', function($scope) {$scope.username = 'World';$scope.sayHello = function() {$scope.greeting = 'Hello ' + $scope.username + '!';};}]); indhulo u r 'injecting' $scope object to 'Mycontroller'...ikkada 'Mycontroller' is the one thing that's bound to the view and it contains the bussiness logic...so nee view lo u can access this '$scope' object properties like username...and like u can see methods and functions are assigned to this $scope object which can be called in the view...... in simple terms mycontroller has dependencies on $scope object ......ala chala dependencies ni inject cheyyachu
dotnetrockz Posted April 7, 2015 Report Posted April 7, 2015 Ok cool...Got it and the use of this is to avoid multiple implementations? every solution ki starting point is seperation of concern.......like seperating the code into layers and using dep injection when needed to use them......ivvani jquery lo kuda cheyyachu except that u'll be writing lines of js code ..in a procedural format...but angular lo inbuilt DI...Ajax functionality......$http calls to SERVER methods ila chala features unnayi... angularjs site lo documentaion masthu undhi...layman terms llo explain chesadu...so starting point adhi... and also people who want to get more billing and stuff master in agularjs ....with .net u'll easily get 80-90
Osama Bin Gandhi Posted April 7, 2015 Report Posted April 7, 2015 great! thanks for the suggestion nissan every solution ki starting point is seperation of concern.......like seperating the code into layers and using dep injection when needed to use them......ivvani jquery lo kuda cheyyachu except that u'll be writing lines of js code ..in a procedural format...but angular lo inbuilt DI...Ajax functionality......$http calls to SERVER methods ila chala features unnayi... angularjs site lo documentaion masthu undhi...layman terms llo explain chesadu...so starting point adhi... and also people who want to get more billing and stuff master in agularjs ....with .net u'll easily get 80-90
Recommended Posts