We know that html is the client side scripting, while using angularjs framework in html we include "ng" in html tags.My Question is how the browser recognize or identifies the html tags which has "ng".please give the right solution for my question.
AngularJS extends HTML with ng-directives. The ng-app directive defines an AngularJS application. The ng-model directive binds the value of HTML controls (input, select, textarea) to application data. The ng-bind directive binds application data to the HTML view.
How AngularJS Integrates with HTML. The ng-app directive indicates the start of AngularJS application. The ng-model directive creates a model variable named name, which can be used with the HTML page and within the div having ng-app directive.
What browsers does AngularJS work with? We run our extensive test suite against the following browsers: the latest versions of Chrome, Firefox, Safari, and Safari for iOS, as well as Internet Explorer versions 9-11. See Internet Explorer Compatibility for more details on supporting legacy IE browsers.
Answer: A) ng-model is used to find the values of HTML controls to application data. 14. Choose whether true or false: Angular JS is completely based on HTML and JavaScript. Answer: A) The above statement is true.
Below point helped me in understanding "How angularjs tags are understood by the browser":
For detailed information on how HTML compiler works, please follow the below link: https://docs.angularjs.org/guide/compiler
Angular 1 needs the angular.js file to be included in the index.html so that it will translate the directives to browser understandable form.
While in the angular2 the typesscript is used, in which the type script compiler compiles or translates the typescript code into the browser understandable javascript/ecmascript automatically which will be rendered on screen.
The angular js will run on the fly in the browser while angular 2 and above needs the precompilation or can be said as translation to javascript/ecmascript. Also if the translation is mentioned with a production build flag the translated javascript/ ecmascript will be a minified one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With