tag:blogger.com,1999:blog-45720237564654932022024-03-08T12:57:03.575-08:00Takshila Classes - Guru SpeaksStay focused and get motivated by Takshila's Guru!! - www.takshilaclasses.inAnonymoushttp://www.blogger.com/profile/11752424541894092913noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-4572023756465493202.post-60099126725021729912017-02-26T08:00:00.001-08:002017-02-26T08:00:46.901-08:00Interview Q & A : AngularJS<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">1. What is AngularJS?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
Angular JS is a Javascript framework. Angular JS extends HTML with ng-directives.<br style="box-sizing: border-box;" />The ng-app directive defines an AngularJS application.<br style="box-sizing: border-box;" />The ng-model directive binds the value of HTML controls (input, select, textarea) to application data.<br style="box-sizing: border-box;" />The ng-bind directive binds application data to the HTML view.</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">2. Why to use AngularJS or what all are the advantages of angular JS?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-info" style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Advantage of using AngularJS:</span></div>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
i)Supports MVC<br style="box-sizing: border-box;" />ii)Uses the plain javascript objects<br style="box-sizing: border-box;" />iii)A declarative user interface<br style="box-sizing: border-box;" />iv)Filters filter the data before reaching view<br style="box-sizing: border-box;" />v)Write less code</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">3. How AngularJS is different from other JavaScript Framework?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
AngularJS is a framework. It has following features</div>
<ul style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; list-style: circle; margin: 0px 0px 2rem 2em; outline: 0px; padding: 0px; vertical-align: baseline;">
<li style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Two way data binding</li>
<li style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">MVC framework</li>
<li style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Template</li>
<li style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Custom-directive (reusable components)</li>
<li style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">REST-friendly</li>
<li style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">set up a link for any dynamic page</li>
<li style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Form Validation</li>
<li style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Server Communication</li>
<li style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Localization</li>
<li style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Dependency injection</li>
<li style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Full testing environment</li>
</ul>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">4. What IDEs you can use for AngularJS development?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
You can write angular JS in any IDE</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">5. Compare the features of AngularJS and jQuery?</span></h3>
<table style="background: 0px 0px rgb(255, 255, 255); border-bottom: 1px solid rgb(204, 204, 204); border-collapse: collapse; border-image: initial; border-left: none; border-right: none; border-spacing: 0px; border-top: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; line-height: 1.8em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline; width: 527px;"><tbody style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;" width="292"></td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;" width="123">Jquery</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;" width="112">Angular JS</td></tr>
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">Restful API</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">no</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td></tr>
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">Integration test runner</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">no</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td></tr>
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">MVC support</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">no</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">Yes</td></tr>
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">template</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">no</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td></tr>
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">two way of binding</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">no</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td></tr>
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">dependency management</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">no</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td></tr>
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">AJAX</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td></tr>
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">Unit test runner</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td></tr>
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">cross module communication</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td></tr>
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">form validation</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">no</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td></tr>
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">Localization</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">no</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">yes</td></tr>
<tr style="background: 0px 0px; border: none; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">file size</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">32kb</td><td style="background: 0px 0px; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; outline: 0px; padding: 0.5em; vertical-align: baseline;">38kb</td></tr>
</tbody></table>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">6. Is AngularJS a library, framework, plugin or a browser extension?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
framework</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">7. What browsers AngularJS support?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
Angular JS supports all major browsers, IE8 and above,safari,mozila,chrome etc</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">8. What is the size of angular.js file?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
38kb</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">9. What are AngularJS features?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
AngularJS is a framework. It has following features<br style="box-sizing: border-box;" />1.Two way data binding<br style="box-sizing: border-box;" />2.MVC framework<br style="box-sizing: border-box;" />3.Template<br style="box-sizing: border-box;" />4.Custom-directive (reusable components)<br style="box-sizing: border-box;" />5.REST-friendly<br style="box-sizing: border-box;" />6.set up a link for any dynamic page<br style="box-sizing: border-box;" />7.Form Validation<br style="box-sizing: border-box;" />8.Server Communication<br style="box-sizing: border-box;" />9.Localization<br style="box-sizing: border-box;" />10.Dependency injection<br style="box-sizing: border-box;" />11.Full testing environment</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">10. How AngularJS handle the security?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
i) Define global variables in app-module<br style="box-sizing: border-box;" />ii)Define the service for Authorization<br style="box-sizing: border-box;" />iii)use security in routing</div>
<div class="code-block code-block-2" style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin: 8px 0px; outline: 0px; padding: 0px; vertical-align: baseline;">
</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">11. What are Modules in AngularJS?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
A module is a container for different parts of application</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">12. What components can be defined within AngularJS modules?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
Application name and controller name can be defined in Module</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">13. What is core module in AngularJS?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
To install angular-module-core, simply install it as a dependency in your Node.js project.</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">14. What is difference between config() and run() method in AngularJS?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
The module can have both config and run functions.<br style="box-sizing: border-box;" />The run()could be useful to perform any kind of initialization after the objects instances registered in the module have already been created.<br style="box-sizing: border-box;" />The config() is useful to configure providers before they are actually created</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">15. What is Global API?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
The global APIs are available when the angular.js library is loaded, and you can access them by using the angular object</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">16. What is Angular Prefixes $?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
$ prefix is for angularJS predefined service only.</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">17. What are Filters in AngularJS?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
Filters can be added to expressions and directives using a pipe character.<br style="box-sizing: border-box;" />AngularJS filters can be used to transform data<br style="box-sizing: border-box;" />currency – Format a number to a currency format.<br style="box-sizing: border-box;" />filter – Select a subset of items from an array.<br style="box-sizing: border-box;" />lowercase – Format a string to lower case.<br style="box-sizing: border-box;" />orderBy – Orders an array by an expression.<br style="box-sizing: border-box;" />uppercase – Format a string to upper case.</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">18. What are Expressions in AngularJS?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
AngularJS expressions are written inside double braces: {{ expression }}.Binds data to HTML the same way as the ng-bind directive.it would “output” data exactly where the expression is written.<br style="box-sizing: border-box;" />These are like JavaScript expressions: They can contain literals, operators, and variables.</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">19. What are Directives in AngularJS?</span></h3>
<div class="code-block code-block-11" style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin: 8px 0px; outline: 0px; padding: 0px; vertical-align: baseline;">
</div>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
Angular JS extends attributes called directives<br style="box-sizing: border-box;" />ng-app directive initializes an AngularJS application.<br style="box-sizing: border-box;" />ng-init directive initializes application data.<br style="box-sizing: border-box;" />ng-model directive binds the value of HTML controls (input, select, textarea) to application data.<br style="box-sizing: border-box;" />20. What is the role of ng-app, ng-init and ng-model directives?<br style="box-sizing: border-box;" />ng-app directive initializes an AngularJS application.<br style="box-sizing: border-box;" />ng-init directive initializes application data.<br style="box-sizing: border-box;" />ng-model directive binds the value of HTML controls (input, select, textarea) to application data.</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">21. What is restrict option in directive?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
With the restrict property of a directive’s definition object we can decide where our directive can appear in the DOM. We have four options:<br style="box-sizing: border-box;" />restrict: ‘E’ : The directive can appear only as HTML element<br style="box-sizing: border-box;" />restrict: ‘A’ : The directive can appear only as HTML attribute in an element. This is the default value if restrict is not specified<br style="box-sizing: border-box;" />restrict: ‘C’ : The directive can appear only inside a class attribute of a HTML element<br style="box-sizing: border-box;" />restrict: ‘M’ : The directive can appear only inside a HTML comment.</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">22. What is bootstrap? Difference between auto bootstrap process and Manual bootstrap in AngularJS?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
Bootstrap is a stylesheet.To include Bootstrap in your AngularJS application, add the following line to the head of your document:<br style="box-sizing: border-box;" /><link rel=”stylesheet” href=”<a href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" style="background: 0px 0px; border: none; box-sizing: border-box; color: #21759b; cursor: pointer; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css</a>“></div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">23. What is scope in AngularJS?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
A $scope is an object that ties a view (a DOM element) to the controller. In the Model-View-Controller structure, this $scope object becomes the model</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">24. What is $scope and $rootScope?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
The $rootScope is the top-most scope that is created on the DOM element that contains the ng-app directive<br style="box-sizing: border-box;" />A $scope is an object that ties a view (a DOM element) to the controller. In the Model-View-Controller structure, this $scope object becomes the model</div>
<h3 style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #cc6600; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 1.55em; font-weight: 400; line-height: 1.2em; margin: 0px 0px 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span class="text-success" style="background: 0px 0px; border: none; box-sizing: border-box; font-size: 23.25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">25. Explain directives ng-if, ng-switch and ng-repeat?</span></h3>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
ng-if:<br style="box-sizing: border-box;" />This directive can add / remove HTML elements from the DOM based on an expression. If the expression is true, it add HTML elements to DOM, otherwise HTML elements are removed from the DOM<br style="box-sizing: border-box;" />ng-switch:<br style="box-sizing: border-box;" />This directive can add / remove HTML elements from the DOM conditionally based on scope expression.<br style="box-sizing: border-box;" />ng-repeat:<br style="box-sizing: border-box;" />This directive is used to iterate over a collection of items and generate HTML from it.</div>
<div style="background: 0px 0px rgb(255, 255, 255); border: none; box-sizing: border-box; color: #444444; font-family: "Open Sans", "Trebuchet MS", sans-serif; font-size: 15px; margin-bottom: 2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
Questions & Answer Courtesy by <a href="http://www.csharpstar.com/" style="background: 0px 0px; border: none; box-sizing: border-box; color: #21759b; cursor: pointer; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">CsharpStar</a>. </div>
</div>
Anonymoushttp://www.blogger.com/profile/11752424541894092913noreply@blogger.com0tag:blogger.com,1999:blog-4572023756465493202.post-48504464595600074992017-02-26T07:47:00.000-08:002017-02-26T07:47:17.233-08:00Interview Q & A : jQuery Programming<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px;">
<strong><br /></strong></div>
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px;">
<strong>Q1. What is Jquery in the context of web applications.</strong></div>
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px;">
<div style="padding-left: 30px;">
jQuery is nothing but a collection of well written javascript code.<br />In other words Jquery is ready made concise and fast JavaScript Library to be used.</div>
</div>
<br style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px; text-align: center;" />
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px;">
<strong>Q2. What are the advantages of using jQuery over JavaScript in ASP.NET web application </strong><br /><div style="padding-left: 30px;">
Below are the advatages of using jQery over JavaScript<br /><br />1.Jquery is well written optimised javascript code so<br />it will be faster in execution unless we write same standard optimised javascript code.<br />2.Jquery is concise java script code ,means minimal ammount of code<br />is to be written for the same functionality than the javascript.<br />3.Javascript related Development is fast using Jquery because most of the<br />functionality is already written in the library and we just need to use that.<br />4.Jquery has cross browser support ,so we save time for supporting all the browsers. </div>
</div>
<br style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px; text-align: center;" />
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px;">
<strong>Q3. How to use jQuery in ASP.NET web application </strong><br /><div style="padding-left: 30px;">
To use jQuery in ASP.NET web application follow the below steps:<br />a)Go to http://jquery.com/(The official jQuery WebSite)<br />b)Download latest .js jQuery file from the website.<br />c)Put it the script(or other folder) in the root of your web application<br />d)Add the below tag on the page where you want to use Jquery<br />script type="text/javascript" src="script/jQueryDownLoadedFileName.js" /script</div>
</div>
<br style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px; text-align: center;" />
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px;">
<strong>Q4. What is the use of Jquery min js file in ASP.NET web application </strong><br /><div style="padding-left: 30px;">
JQuery min .js file is actully a minified version of<br />Actual JQuery .js. The min files have less size but same content so<br />this improves the performance.so You should prefer to use min files.</div>
</div>
<br style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px; text-align: center;" />
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px; text-align: center;">
</div>
<br style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px; text-align: center;" />
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px;">
<strong>Q5. What is the advantages of use of document.ready functions in jQuery </strong><br /><div style="padding-left: 30px;">
Advantage of using $(document).ready(function () in jQuery<br />is that the code inside this function will excecute only when<br />the full page has been loaded so that there will be no error like<br />the DOM object on which the Jquery has to execute is not loaded.</div>
</div>
<br style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px; text-align: center;" />
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px;">
<strong>Q6. Can we write more than one document.ready jQuery functions in one page </strong><br /><div style="padding-left: 30px;">
Yes we can write more than one jquery $(document).ready(function ()<br />in one page.This is helpful when you have large Jquery code<br />and you want to split it in multiple files.</div>
</div>
<br style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px; text-align: center;" />
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px;">
<strong>Q7. How to select an element with Id in Jquery </strong><br /><div style="padding-left: 30px;">
To select an element with Id write as below:<br />var divValue = $(''#sampleDivId'').val();</div>
</div>
<br style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px; text-align: center;" />
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px;">
<strong>Q8. How to select an element with class in Jquery</strong><br /><div style="padding-left: 30px;">
To select an element with class write as below:<br />$(".sampleClass").css("border","2px solid blue");</div>
</div>
<br style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px; text-align: center;" /><br />
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px;">
<strong>Q9. What is the difference between jQuery find and children methods</strong><br /><div style="padding-left: 30px;">
The difference between find() and children() methods<br />are that the children only travels a single level down the DOM tree<br />while the find travels at all level down the DOM tree.</div>
</div>
<br style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px; text-align: center;" />
<div style="background-color: #e8e8e8; font-family: Verdana; font-size: 12px;">
<strong>Q10. How to use length function in jQuery to text existance of an element by Id </strong><br /><div style="padding-left: 30px;">
To test if an element exists we can use length method in jQuery as below:<br />if $(''#mySampleDiv'').length )//Tests wheter the div with id mySampleDiv exists or not<br />$(mySampleDiv).find(''div'');</div>
<div>
<br /></div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/11752424541894092913noreply@blogger.com0tag:blogger.com,1999:blog-4572023756465493202.post-78556756529258394492017-02-20T23:11:00.001-08:002017-02-20T23:11:32.353-08:00Interview Q & A: CSS Style Code<p dir="ltr"><b>1) What is Cascading Style Sheet (CSS) ?</b></p>
<p dir="ltr">CSS is used for applying the styles for the HTML elements. So in a typical HTML document CSS will be applied to complete document for styling the elements.</p>
<p dir="ltr"><b>2) What does “Cascading” in CSS mean?</b></p>
<p dir="ltr">“Cascading” refers to the cascading order in HTML document. This will sort the declared CSS in an order to avoid the conflicts.</p>
<p dir="ltr"><b>3) What are the different types of CSS?</b></p>
<p dir="ltr">Below are the different types of CSS –</p>
<p dir="ltr">Embedded – Adding the CSS styles in <style> attribute.Inline – Adding the CSS to the HTML elements.Linked/External – Adding the External CSS file to the HTML document.</p>
<p dir="ltr"> </p>
<p dir="ltr"><b>4) Explain the advantages of CSS?</b></p>
<p dir="ltr">Below are some of the advantages of CSS –</p>
<p dir="ltr">AccessibilityMultiple Device CompatibilityPage will load fastMaintenance is EasyOffline Browsing</p>
<p dir="ltr"><b>5) List out the components of CSS style?</b></p>
<p dir="ltr">Below are the different components of CSS styles –</p>
<p dir="ltr">Property SelectorValue</p>
<p dir="ltr"><b>6) Explain type selector in CSS?</b></p>
<p dir="ltr">Type selector matches the element of specific type. To give the color for all inputs with text types, we can do like this.</p>
<p dir="ltr">input[type="text"]{<br>
color: #b2bfc7;<br>
}</p>
<p dir="ltr"><b>7) Explain universal selector in CSS?</b></p>
<p dir="ltr">Universal selectors is used to match any element types. Below is the example for the same. For example,</p>
<p dir="ltr">* { <br>
color: #FFFFFF; <br>
}</p>
<p dir="ltr">This rule is used to render the content of all elements in our document in white.</p>
<p dir="ltr"><b>8) Explain descendant selector in CSS?</b></p>
<p dir="ltr">Descendant selectors are used when any style to be applied to an element when the element lies inside some element. For example,</p>
<p dir="ltr">ul em {<br>
color: #FFFFFF; <br>
}</p>
<p dir="ltr">As shown above style applied to element – “<em>” when it lies inside “<li>”.</p>
<p dir="ltr"><b>9) Explain id selector in CSS?</b></p>
<p dir="ltr">Id selector is used to apply the style to an element based on the “id” of an element. For example,</p>
<p dir="ltr">#elementId {<br>
color: #FFFFFF; <br>
}</p>
<p dir="ltr">In the above code snippet all the elements having id – “elementId” will have the color white.</p>
<p dir="ltr"><b>10) Explain class selector in CSS?</b></p>
<p dir="ltr">Class selector is used to apply the style to an element based on the “class name” of an element. For example,</p>
<p dir="ltr">.elementClassName {<br>
color: #FFFFFF; <br>
}</p>
<p dir="ltr">In the above code snippet all the elements having class name – “elementClassName” will have the color white.</p>
<p dir="ltr"><b>11) Is it possible to make a class selector for a particular element? If so How?</b></p>
<p dir="ltr">Yes we can make a class selector for a particular element. Below is the example for the same –</p>
<p dir="ltr">h2.myelementClassName {<br>
color: #FFFFFF; <br>
}</p>
<p dir="ltr">Above example depicts whenever class name – “myelementClassName” found under element “h2” apply white color.<br>
<b>12) How to use external style sheets?</b></p>
<p dir="ltr">External style sheets will be used to refer the style information from the external file. In HTML document this can be used to refer in the <HEAD> section like below –</p>
<p dir="ltr"><Head> <br>
<Link rel=”stylesheet” href="/MyTestStyle.css" type="text/css"> <br>
</ Head ></p>
<p dir="ltr"> </p>
<p dir="ltr"><b>13) Explain “</b><b>Atrribute</b><b> Selector” in CSS?</b></p>
<p dir="ltr">Attribute selector can be used to apply a style for an HTML element with particular attribute. Example gien below is used to apply a style for input element with particular attribute (text)</p>
<p dir="ltr">input[type = "text"]{<br>
color: #FFFFFF; <br>
}</p>
<p dir="ltr"><b>14) Is CSS a case-sensitive or case-insensitive?</b></p>
<p dir="ltr">CSS is case insensitive.</p>
<p dir="ltr"><b>15) Which property will be used for changing the face of font in CSS?</b></p>
<p dir="ltr">“font family” property can be used for changing the face of font.</p>
<p dir="ltr"><b>16) How to use grouping in CSS?</b></p>
<p dir="ltr">Grouping is mainly used for applying css style for multiple HTML elements and this can be done with single declaration. Example gien below is the example of the grouping –</p>
<p dir="ltr">h2, h3 <br>
{ <br>
color: #FFFFFF; <br>
}</p>
<p dir="ltr"><b>17) Explain child selector in CSS?</b></p>
<p dir="ltr">Child selectors can be used for applying the style for parent element and this will descend to the child elements. Below is the example -</p>
<p dir="ltr">body > input{<br>
color: #FFFFF1;<br>
}</p>
<p dir="ltr">Above example is used for applying the white color to all the inputs which are lying in body tag.</p>
<p dir="ltr"><b>18) What is the to use “float” property in CSS?</b></p>
<p dir="ltr">Float property is used to allow an HTML element to be positioned horizontally. Float property can take the values either “left” or “right”. For example,</p>
<p dir="ltr">h1, h2<br>
{<br>
float: right; <br>
}</p>
<p dir="ltr"><b>19) Which property is used to control the position in the background for image?</b></p>
<p dir="ltr">“background-position” property can be used for controlling the position of the image in background.</p>
<p dir="ltr"><b>20) How do you write a conditional statement in CSS? Give an example.</b></p>
<p dir="ltr">Below is the example of writing a conditional statement in CSS –</p>
<p dir="ltr"><style type=”text/css”><br>
body<br>
{<br>
color: #00BFFF;<br>
}<br>
</style></p>
<p dir="ltr"><!—if [ IE 8] ><br>
<style type=”text/css”><br>
body<br>
{<br>
Background-color: #00FFBF;<br>
}<br>
</style><br>
<! [end if] --></p>
<p dir="ltr">The above code snippet will change the background color to “00FFBF” if the browser is IE 8 or will have a default color if its other browsers.</p>
<p dir="ltr"><b>21) Mention the property name which is used for making the font oblique in CSS?</b></p>
<p dir="ltr">“font-style” property can be used for making the font oblique.<br></p>
Anonymoushttp://www.blogger.com/profile/11752424541894092913noreply@blogger.com0tag:blogger.com,1999:blog-4572023756465493202.post-41295200373452668332017-02-20T23:00:00.001-08:002017-02-20T23:04:13.006-08:00Interview Q & A: JavaScript Programming<p dir="ltr"><b>1) What is </b><b>Javascript</b><b>?</b></p>
<p dir="ltr">Javascript is a client side scripting language which is understood by the browsers and will be added in the HTML code.</p>
<p dir="ltr"><b>2) Explain </b><b>Javascript</b><b> Types?</b></p>
<p dir="ltr">Below are some javascript types –</p>
<p dir="ltr">BooleanStringNumberNullObjectFunctionUndefined</p>
<p dir="ltr"><b>3) Why to use NaN in </b><b>javascript</b><b>?</b></p>
<p dir="ltr">“NaN” function is used check the number in the argument. If it does not contain number then it will return true else it will return false.</p>
<p dir="ltr"><b>4) Explain negative infinity?</b></p>
<p dir="ltr">“Negative Number” is a number which is obtained from dividing the negative number by zero.</p>
<p dir="ltr"><b>5) Can </b><b>javascript</b><b> code be broken into multiple lines?</b></p>
<p dir="ltr">Yes it is possible to break the javascript code to multiple lines using backslash ‘\’.</p>
<p dir="ltr"><b>6) What are undeclared variables in </b><b>javascript</b><b>?</b></p>
<p dir="ltr">Undeclared variables are the ones which does not exist and are not declared in the program. So while running the program runtime error will be thrown.</p>
<p dir="ltr"><b>7) What are undefined variables in </b><b>javascript</b><b>?</b></p>
<p dir="ltr">Undefined variables are the ones which exist in the program but are not defined or not assigned any value for that variable.</p>
<p dir="ltr"><b>8) Explain global variables in </b><b>javascript</b><b>?</b></p>
<p dir="ltr">If the variable can be accessed anywhere in the code is called global variables and these will not have any scope in the application.</p>
<p dir="ltr"><b>9) Explain Prompt box in </b><b>javascript</b><b>?</b></p>
<p dir="ltr">Prompt box is used to get the input from the user by popping up the window to the user.</p>
<p dir="ltr"><b>10) Why to use “this” keyword in </b><b>javascript</b><b>?</b></p>
<p dir="ltr">‘this’ keyword is used to refer the current object in the program. “this” keyword is used mainly inside the method to refer to the current variable or current object.</p>
<p dir="ltr"><b>11) What is “</b><b>SetTimeOut</b><b>” function in </b><b>javascript</b><b>?</b></p>
<p dir="ltr">“SetTimeOut” function is used to call the function given as a parameter after some time delay. Below is the javascript code for the same –</p>
<p dir="ltr">setTimeout(function(){ alert("Text to Show"); }, 5000);</p>
<p dir="ltr"><b>12) What is “</b><b>SetInterval</b><b>” function in </b><b>javascript</b><b>?</b></p>
<p dir="ltr">“SetInterval” function is used to call the function (given as a parameter) repeatedly after some time delay. Below is the javascript code for the same –</p>
<p dir="ltr">setInterval (function(){ alert("Text to Show"); }, 5000);</p>
<p dir="ltr"><b>13) What is “</b><b>ClearInterval</b><b>” function in </b><b>javascript</b><b>?</b></p>
<p dir="ltr">“ClearInterval” function is used to clear the time set from function – “SetInterval()”.</p>
<p dir="ltr"><b>14) How to give comments in </b><b>javascript</b><b>?</b></p>
<p dir="ltr">For single line comment – “//”For multi-line comments – “/* */”</p>
<p dir="ltr"><b>15) Why to use “===” operator in </b><b>javascript</b><b>?</b></p>
<p dir="ltr">“===” operator is called strict operator and it returns true when both the values are same and returns false when the values are not same.</p>
<p dir="ltr"><b>16) How we can submit a form using </b><b>javascript</b><b>?</b></p>
<p dir="ltr">For submitting a form from javascript we have to use – document.form[0].submit() method.</p>
<p dir="ltr"><b>17) Will </b><b>javascript</b><b> support automatic conversion of type?</b></p>
<p dir="ltr">Yes javascript will support automatic conversion of type.</p>
<p dir="ltr"><b>18) How we can change the style of an element from </b><b>javascript</b><b>?</b></p>
<p dir="ltr">Below code can be used to change the style of an element –</p>
<p dir="ltr">document.getElementByID(‘mytestid’).className = “testclass”;</p>
<p dir="ltr"><b>19) How we can change the </b><b>fontsize</b><b> from </b><b>javascript</b><b>?</b></p>
<p dir="ltr">Below code can be used to change the font size –</p>
<p dir="ltr">document.getElementByID(‘mytestid’).style.fontsize = “12”;</p>
<p dir="ltr"><b>20) How we can read and write file in </b><b>javascript</b><b>?</b></p>
<p dir="ltr">Below are the ways to read and write files in javascript –</p>
<p dir="ltr">Using Active X objectsUsing Javascript Extension<br></p>
Anonymoushttp://www.blogger.com/profile/11752424541894092913noreply@blogger.com0tag:blogger.com,1999:blog-4572023756465493202.post-61761057232431838322017-02-20T22:39:00.001-08:002017-02-20T22:45:43.688-08:00Interview Q & A: HTML Programming<p dir="ltr"><u>Hi</u> there!! We know how difficult to crack an interview. It's doesn't matters if you are experts of you subjects or not, a last minute revision is must for all of us.<br>
Here we are providing some selected questions to help you to the last minutes revision. Best of luck!!</p>
<p dir="ltr"><b><font color="#0000ff"> What is HTML?</font></b><br>
Answer1:<br>
HTML, or HyperText Markup Language, is a Universal language which allows an individual using special code to create web pages to be viewed on the Internet.</p>
<p dir="ltr">Answer2:<br>
HTML ( H yper T ext M arkup L anguage) is the language used to write Web pages. You are looking at a Web page right now. <br>
You can view HTML pages in two ways:<br>
* One view is their appearance on a Web browser, just like this page -- colors, different text sizes, graphics.<br>
* The other view is called "HTML Code" -- this is the code that tells the browser what to do.</p>
<p dir="ltr"><b><font color="#0000ff">What is a tag? </font></b><br>
In HTML, a tag tells the browser what to do. When you write an HTML page, you enter tags for many reasons -- to change the appearance of text, to show a graphic, or to make a link to another page.</p>
<p dir="ltr"><b><font color="#0000ff">What is the simplest HTML page? </font></b><br>
HTML Code:<br>
<HTML><br>
<HEAD><br>
<TITLE>This is my page title! </TITLE><br>
</HEAD><br>
<BODY><br>
This is my message to the world!<br>
</BODY><br>
</HTML> </p>
<p dir="ltr">Browser Display:<br>
This is my message to the world!</p>
<p dir="ltr"><b><font color="#0000ff">How do I create frames? What is a </font></b><b><font color="#0000ff">frameset</font></b><b><font color="#0000ff">? </font></b><br>
Frames allow an author to divide a browser window into multiple (rectangular) regions. Multiple documents can be displayed in a single window, each within its own frame. Graphical browsers allow these frames to be scrolled independently of each other, and links can update the document displayed in one frame without affecting the others. <br>
You can't just "add frames" to an existing document. Rather, you must create a frameset document that defines a particular combination of frames, and then display your content documents inside those frames. The frameset document should also include alternative non-framed content in a NOFRAMES element. <br>
The HTML 4 frames model has significant design flaws that cause usability problems for web users. Frames should be used only with great care.</p>
<p dir="ltr"><b><font color="#0000ff">How can I include comments in HTML? </font></b><br>
Technically, since HTML is an SGML application, HTML uses SGML comment syntax. However, the full syntax is complex, and browsers don't support it in its entirety anyway. Therefore, use the following simplified rule to create HTML comments that both have valid syntax and work in browsers:</p>
<p dir="ltr">An HTML comment begins with "<!--", ends with "-->", and does not contain "--" or ">" anywhere in the comment. <br>
The following are examples of HTML comments:</p>
<p dir="ltr">* <!-- This is a comment. --><br>
* <!-- This is another comment,<br>
and it continues onto a second line. --><br>
* <!----></p>
<p dir="ltr">Do not put comments inside tags (i.e., between "<" and ">") in HTML markup.</p>
<p dir="ltr"><b><font color="#0000ff">What is a Hypertext link? </font></b><br>
A hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumps to the link's destination.</p>
<p dir="ltr"><b><font color="#0000ff">How comfortable are you with writing HTML entirely by hand?</font></b></p>
<p dir="ltr"><b>[_private/tble_firefox.htm]</b></p>
<p dir="ltr">Very. I don’t usually use WYSIWYG. The only occasions when I do use Dreamweaver are when I want to draw something to see what it looks like, and then I’ll usually either take that design and hand-modify it or build it all over again from scratch in code. I have actually written my own desktop HTML IDE for Windows (it’s called Less Than Slash) with the intention of deploying it for use in web development training. If has built-in reference features, and will autocomplete code by parsing the DTD you specify in the file. That is to say, the program doesn’t know anything about HTML until after it parses the HTML DTD you specified. This should give you some idea of my skill level with HTML.</p>
<p dir="ltr"><b><font color="#0000ff">What is everyone using to write HTML? </font></b><br>
Everyone has a different preference for which tool works best for them. Keep in mind that typically the less HTML the tool requires you to know, the worse the output of the HTML. In other words, you can always do it better by hand if you take the time to learn a little HTML.</p>
<p dir="ltr"><b><font color="#0000ff">What is a </font></b><b><font color="#0000ff">DOCTYPE</font></b><b><font color="#0000ff">? Which one do I use? </font></b><br>
According to HTML standards, each HTML document begins with a DOCTYPE declaration that specifies which version of HTML the document uses. Originally, the DOCTYPE declaration was used only by SGML-based tools like HTML validators, which needed to determine which version of HTML a document used (or claimed to use). <br>
Today, many browsers use the document's DOCTYPE declaration to determine whether to use a stricter, more standards-oriented layout mode, or to use a "quirks" layout mode that attempts to emulate older, buggy browsers.</p>
<p dir="ltr"><b><font color="#0000ff">Can I nest tables within tables? </font></b><br>
Yes, a table can be embedded inside a cell in another table. Here's a simple example: </p>
<p dir="ltr"><table><br>
<tr><br>
<td>this is the first cell of the outer table</td><br>
<td>this is the second cell of the outer table,</p>
<p dir="ltr">with the inner table embedded in it<br>
<table><br>
<tr><br>
<td>this is the first cell of the inner table</td><br>
<td>this is the second cell of the inner table</td><br>
</tr><br>
</table><br>
</td><br>
</tr><br>
</table></p>
<p dir="ltr">The main caveat about nested tables is that older versions of Netscape Navigator have problems with them if you don't explicitly close your TR, TD, and TH elements. To avoid problems, include every </tr>, </td>, and </th> tag, even though the HTML specifications don't require them. Also, older versions of Netscape Navigator have problems with tables that are nested extremely deeply (e.g., tables nested ten deep). To avoid problems, avoid nesting tables more than a few deep. You may be able to use the ROWSPAN and COLSPAN attributes to minimize table nesting. Finally, be especially sure to validate your markup whenever you use nested tables.<br></p><p style="font-family: "Times New Roman"; background-color: rgb(255, 255, 255);"><font color="#0000FF"><b><span class="style56" style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: rgb(0, 0, 0); border-collapse: collapse;">Can I have two or more actions in the same form?</span><span class="answers" style="font-family: "Bookman Old Style", Arial, "Times New Roman"; font-size: 14px;"><br></span></b></font><span class="answers" style="font-family: "Bookman Old Style", Arial, "Times New Roman"; font-size: 14px;">No. A form must have exactly one action. However, the server-side (e.g., CGI) program that processes your form submissions can perform any number of tasks (e.g., updating a database, sending email, logging a transaction) in response to a single form submission.</span></p><p style="font-family: "Times New Roman"; background-color: rgb(255, 255, 255);"><font class="for_questions_blue" style="font-family: VErdana; font-size: 13px; font-weight: bold;"><b>How can I use forms for pull-down navigation menus? </b></font><span class="answers" style="font-family: "Bookman Old Style", Arial, "Times New Roman"; font-size: 14px;"><br>There is no way to do this in HTML only; something else must process the form. JavaScript processing will work only for readers with JavaScript-enabled browsers. CGI and other server-side processing is reliable for human readers, but search engines have problems following any form-based navigation.</span></p><p style="font-family: "Times New Roman"; background-color: rgb(255, 255, 255);"><font class="for_questions_blue" style="font-family: VErdana; font-size: 13px; font-weight: bold;"><b>How can I avoid using the whole URL? </b></font><span class="answers" style="font-family: "Bookman Old Style", Arial, "Times New Roman"; font-size: 14px;"><br>The URL structure defines a hierarchy (or relationship) that is similar to the hierarchy of subdirectories (or folders) in the filesystems used by most computer operating systems. The segments of a URL are separated by slash characters ("/"). When navigating the URL hierarchy, the final segment of the URL (i.e., everything after the final slash) is similar to a file in a filesystem. The other segments of the URL are similar to the subdirectories and folders in a filesystem. <br>A relative URL omits some of the information needed to locate the referenced document. The omitted information is assumed to be the same as for the base document that contains the relative URL. This reduces the length of the URLs needed to refer to related documents, and allows document trees to be accessed via multiple access schemes (e.g., "file", "http", and "ftp") or to be moved without changing any of the embedded URLs in those documents. <br>Before the browser can use a relative URL, it must resolve the relative URL to produce an absolute URL. If the relative URL begins with a double slash (e.g., //www.yoursite.com/faq/html/), then it will inherit only the base URL's scheme. If the relative URL begins with a single slash (e.g., /faq/html/), then it will inherit the base URL's scheme and network location. <br>If the relative URL does not begin with a slash (e.g., all.html , ./all.html or ../html/), then it has a relative path and is resolved as follows.<br><br>1. The browser strips everything after the last slash in the base document's URL and appends the relative URL to the result.<br>2. Each "." segment is deleted (e.g., ./all.html is the same as all.html, and ./ refers to the current "directory" level in the URL hierarchy).<br>3. Each ".." segment moves up one level in the URL hierarchy; the ".." segment is removed, along with the segment that precedes it (e.g., foo/../all.html is the same as all.html, and ../ refers to the parent "directory" level in the URL hierarchy). <br><br>Some examples may help make this clear. If the base document is <URL:http://www.yoursite.com/faq/html/basics.html>, then<br><br>all.html and ./all.html<br>refer to <URL:http://www.yoursite.com/faq/html/all.html> <br>./<br>refers to <URL:http://www.yoursite.com/faq/html/> <br>../<br>refers to <URL:http://www.yoursite.com/faq/> <br>../cgifaq.html<br>refers to <URL:http://www.yoursite.com/faq/cgifaq.html> <br>../../reference/<br>refers to <URL:http://www.yoursite.com/reference/> <br><br>Please note that the browser resolves relative URLs, not the server. The server sees only the resulting absolute URL. Also, relative URLs navigate the URL hierarchy. The relationship (if any) between the URL hierarchy and the server's filesystem hierarchy is irrelevant.</span></p>
Anonymoushttp://www.blogger.com/profile/11752424541894092913noreply@blogger.com0tag:blogger.com,1999:blog-4572023756465493202.post-27085202295868000042017-02-20T21:17:00.000-08:002017-02-20T23:02:02.834-08:00Careers in Web Design: Become a Professional Web Designer<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="subtitle" style="background-color: white; box-sizing: border-box; color: #828282; font-family: "Work Sans", Arial, sans-serif; font-size: 16px;">
If you're going to make Web design or Web development your career, there are many things you'll want to think about. It's important to know what you're getting into before you decide on a job including how much it pays.</div>
<br style="background-color: white; box-sizing: border-box; color: #828282; font-family: "Work Sans", Arial, sans-serif; font-size: 16px;" />
<h3 class="item-heading" style="background-color: white; box-sizing: border-box; font-family: "Work Sans", Arial, sans-serif; font-size: 24px; font-weight: 400; line-height: 1.1; margin: 0px 0px 20px;">
Where to Start</h3>
<div style="background-color: white; box-sizing: border-box; color: #828282; font-family: "Work Sans", Arial, sans-serif; font-size: 16px; margin-bottom: 20px;">
If you're thinking of becoming a professional Web designer, there are a number of things to consider. Firstly, there are many different avenues you can take as a professional Web developer. You can also choose to go freelance or work in a corporation. And being a Web developer isn't all fun and games - make sure you know what the job will entail. Finally, getting education is a great way to make sure you're prepared.</div>
<div style="background-color: white; box-sizing: border-box; color: #828282; font-family: "Work Sans", Arial, sans-serif; font-size: 16px; margin-bottom: 20px;">
With the rapid advancement of technology, it is necessary to constantly update yourself in order to keep up with the latest trend or technology and succeed in this field. This is where passion for the industry and the drive to excel come in handy. Self improvement is a must for all web designers.</div>
<h3 style="background-color: white; box-sizing: border-box; font-family: "Work Sans", Arial, sans-serif; font-size: 24px; font-weight: 400; line-height: 1.1; margin: 0px 0px 20px;">
Get qualified</h3>
<div style="background-color: white; box-sizing: border-box; color: #828282; font-family: "Work Sans", Arial, sans-serif; font-size: 16px; margin-bottom: 20px;">
You won’t need a degree in order to become a Web Designer. However, you will need a good knowledge of coding, as well as experience with the most common Web Design programs.</div>
</div>
Anonymoushttp://www.blogger.com/profile/11752424541894092913noreply@blogger.com0