Following are some of the key points described later in this article:
Yes, it is! All you need to do is following:
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"></script>
<!-- Model 1: ng-app and ng-controller on same div element -->
<div ng-app="HelloApp" ng-controller="HelloCtrl">
</div>
<script type="text/javascript">
angular.module('HelloApp', [])
.controller('HelloCtrl', ['$scope', function($scope){
}])
</script>
<!-- Model 2: ng-controller defined on inner div elements -->
<div ng-app="HelloApp">
<div ng-controller="HelloCtrl1">
</div>
<div ng-controller="HelloCtrl2">
</div>
</div>
<script type="text/javascript">
angular.module('HelloApp', [])
.controller('HelloCtrl1', ['$scope', function($scope){
}])
.controller('HelloCtrl2', ['$scope', function($scope){
}])
</script>
Yes, AngularJS could be used with existing forms in some of the following ways:
Well, this may be of interest to many UI developers who often have been found wondering on whether it would be conflict if one uses AngularJS with JQuery. At times, they have been found to be saying that AngularJS is altogether a different world than JQuery. Well, let me present this fact that AngularJS does make use of lighter version of JQuery which is called as JQLite. Following code is executed during the bootstrap of angular apps. Pay attention to the call of bindJquery() method. It actually tries to bind JQuery. Thus, if you already have used JQuery on the page, it binds JQLite variable with JQuery. Otherwise, it binds JQLite, a lighter version of JQuery which comes packed with AngularJS core script.
if (window.angular.bootstrap) {
//AngularJS is already loaded, so we can return here...
console.log('WARNING: Tried to load angular more than once.');
return;
}
//try to bind to jquery now so that one can write jqLite(document).ready()
//but we will rebind on bootstrap again.
bindJQuery();
publishExternalAPI(angular);
jqLite(document).ready(function() {
angularInit(document, bootstrap);
});
})(window, document);
Thus, the baseline is, it does not impact at all, if you have made use of JQuery in your existing UI. You could simply create Angular apps based on instructions described above in the article.
Well, AngularJS 1.2.* is supported for IE 8 browser. However, from 1.3 release onwards, IE 8 will not be supported. So, if your application needs to be supported on IE 8 in time to come, and you are very keen on using AngularJS, you may have to live with AngularJS 1.2.* versions until you decide to stop supporting IE 8, thereby moving to upcoming Angular 1.3.*.
Artificial Intelligence (AI) agents have started becoming an integral part of our lives. Imagine asking…
In the ever-evolving landscape of agentic AI workflows and applications, understanding and leveraging design patterns…
In this blog, I aim to provide a comprehensive list of valuable resources for learning…
Have you ever wondered how systems determine whether to grant or deny access, and how…
What revolutionary technologies and industries will define the future of business in 2025? As we…
For data scientists and machine learning researchers, 2024 has been a landmark year in AI…