Tag Archives: HTML


What is the difference between required and ng-required?

In HTML attribute required is to tell that field must be required in order for the form to be valid.

And it is not possible to write condition like required=”true” or required=”false”. It gives you a HTML error. This can be solved using Angular.

While, Using Angular attribute ng-required=”MyCondition” means ‘RequireFun(MyCondition)’ and sets the HTML attribute dynamically for you depending on your condition.


Which way to go: Native, Html5, or Hybrid?

In a world that is progressively social and open, portable applications play a key role, and have changed the emphasis from what’s on the Web, to the applications on our smartphone. Versatile applications are no more an alternative, they’re a basic. You require a versatile application, yet where do you begin? Many elements have influence in your versatile technique, for example, your group’s improvement abilities, required gadget usefulness, the significance of security, logged off capacity, interoperability, and so on, that must be considered.


There are mainly 3 options of mobile application development:

mobile application developement
Native Mobile Applications

More or less, local applications give the best ease of use, the best elements, and the best general versatile experience. There are a few things you just get with local applications:

Multi touch – Twofold taps, squeeze spread, and other compound UI motions.

Graphics API – The local stage gives you the speediest design, which may not be a major ordeal in case you’re demonstrating a static screen with just a couple of components, or a major ordeal in case you’re utilizing a great deal of information and require a quick invigorate.

Fluid animation – Identified with the quick representation API is the capacity to have fluid liveliness. This is particularly vital in gaming, exceedingly intelligent reporting, or strong computational calculations for changing photographs and sounds.

Built-in components – The camera, location book, geolocation, and different elements local to the gadget can be consistently incorporated into versatile applications. Another imperative implicit parts is scrambled capacity, yet more about that later.

Usability – The local stage is the thing that individuals are acclimated to, thus when you include that recognition with the local’s majority highlights they expect, you have an application that is out and out simpler to utilize.

Documentation – There are more than 2500 books alone for iOS and Android advancement, with numerous more articles, blog entries, and nitty gritty specialized strings on destinations like StackOverflow.

HTML5 Web Apps

HTML5 is a dialect that empowers designers to make rich online applications that keep running on any gadget by means of the web program; engineers can “compose once, run all over”. A versatile venture may need to make a substantial number of distinctive applications to bolster a horde of differing offices and useful undertakings, which makes HTML5 more alluring financially.

Defenders of HTML5 trust that the quality is practically identical to that of a local application. Likewise, it is less demanding to adapt and roll out improvements to your application in light of the fact that you are not experiencing an application store.

Contentions against HTML5 incorporate execution, hindrance of heading off to a URL rather than downloading an application, and absence of program similarity (not all portable programs bolster the same subset of components).

Hybrid App

The last choice is to make a half and half endeavor portable application, which is composed in HTML5 however wrapped in a local “compartment”, and made by means of cross-stage advancement devices, for example, PhoneGap and Sencha. It would seem that a local application, can be downloaded from an endeavor application store, and can even access on-gadget highlights, however doesn’t contain an ounce of Objective-C or Java code. The engineer ordinarily needs to utilize HTML5, CSS, and JavaScript inside of the stage environment, abilities which are less demanding and less expensive to discover than Objective-C or Java.

One downside to this methodology is timing: there may be issues while sitting tight for your stage to actualize new usefulness discharged by a working framework. This methodology is picking up in prominence: Gartner predicts that by 2016, more than half of all applications conveyed will be crossover.

At last, if your endeavor portable applications oblige access to gadget particular components or predominant response time required for amusements rate advanced applications (video), then local is your most logical option.

On the off chance that you are expense obliged and need to create numerous applications for some stages, or need to do quick prototyping preceding building up the full-highlighted application (run of the mill with a commercial organization), pick HTML5.

In the event that you are some place between the two, well then go half and half.


How to center absolute element in div i.e I need to place a div (with position:absolute;) element in the center of my window.?

Create the any class mentioned as below and assign it to your div..inner {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);

Here the clue is, that left:50% is relative to the parent while the translate in transform is relative to the elements width/height.

This way you have a perfectly centered element, with a flexible width on both child and parent.This works even if the child is bigger than the parent.

You can also center it vertically with this (Note : width and height of parent and child can be totally flexible(i.e. Unknown)). cheap hotels


Floating elements – how to use them, troubles with them, and how to work around the troubles?

Float property is used for wrapping text around images, Floats can be used to create entire web layouts and are also helpful for layout in smaller instances.

The CSS float property allows a developer to incorporate table-like columns in an HTML layout without the use of tables

One of the most common symptoms of float-heavy layouts is the “collapsing parent”. One of the most common ways to fix a collapsed parent element is to place an element with the clear property after our floated element. This will cause the parent to begin reflowing after the floated element. In IE 7, the Bottom Margin Bug is shown when a floated parent has floated children inside it, bottom margin on those children is ignored by the parent.

Quick fix:using bottom padding on the parent instead.


Top 3 Responsive Design Testing Tools You Should Know

Based on the concept of responsive architectural design, the ground breaking approach of Responsive Web Design was created. With the perpetually evolving nature of technology and the copious releases of newer and better devices, it was necessary that this approach be formulated.

Having appreciated the efforts of the pioneers behind the RWD approach and the technology itself, let us now shift our attention to the requirements of the contemporary market. The cut-throat competition, the increasingly prevalent emergence of complete web based businesses and the abundant availability of smartphones has increased the importance of RWD for clients.There are many testing tools in the market that check the transitions and assess compatibility but out of the plethora of options available, three stand out.

Adobe Edge Inspect CC

Adobe Edge Inspect CC

Top of the list is Adobe Edge Inspect, the erstwhile “Adobe Shadow” which is one of the many tools released under the ambit of Adobe Edge, the suite. This tool was developed to preview web designs on popular mobile formats. The primary aim however, was to prevent the design’s associated files from being published onto a server. This tool enables each mobile device paired with the computer to display the same site in its own specific render and mode of presentation be it either IOS or Android. Instead of the routine and standard practise of previewing a site that has been optimized for mobile viewing on a desktop system, the file is sent to the paired devices using this tool where the transition happens and the transformed view is displayed.

This tool also enables live editing of code with the changes being displayed on the paired devices as they are made. The connection host computer can also remotely collect all screenshots from the paired devices using this tool. Wireless pairing of multiple android & IOS devices is possible with this tool. In addition to the above, Adobe Edge Inspect also allows; changes to be made to HTML mark ups, tweaks in CSS rules, JS bin integration, clear caches in devices and refresh pages. It also supports HTTP & SSL/HTTPS authentication support.


  • Fast, (mostly) accurate rendering across devices.
  • You can take screenshots on each device.
  • While the app is running on a device, the screen does not go to sleep. This is a nice feature, as you’re not constantly clicking and sliding on devices to wake them up.


  • Requires installing and running a standalone app to do any testing.
  • Requires Edge Inspect app to be installed on every device.
  • Requires installation of Chrome plugin for managing devices, debugging, manual reloads, etc.
  • Currently can only be run on Android and iOS devices. Meaning, no testing on other browsers, platforms, Microsoft Surface, etc.
  • Often has a real problem loading external Typekit fonts.

Responsive Design Testing Tools
Visual feedback + bug reporting on responsive web sites

Next comes the bug tracker tool Usersnap. This tool can be added as a widget to any web browser and used as a bug tracking system thereby enabling developers to improve Q&A process for projects. The tool’s “Feedback Widget” provides a unique method of reporting where the bug information is displayed on the page itself. It also allows developers and designers to seek clarification through feedback forms if required. These forms, that come in a number of attractive themes, only ask for comments, that’s all, no exhaustive information sought, no hassles for the users.

It enables sending of bug reports as screenshots without the aid of any plug in. Numerous options of demarcating the bugs such as, highlighting, using a pen, adding a note, blacking out the area, using arrows, pixel rulers and adding comments have been incorporated simplifying the entire process. The website loading time and performance remains unaffected as the tool is loaded asynchronously and delivered through a strong CDN. Also, Browser specific issues can be viewed immediately as a view of the user’s browser is sent as a screenshot.


  • Saves testing time by providing clear bug reports.
  • Screenshots with comments from the users and testers are sent via feedback button to fix problems faster.
  • Helps in improving the loading time and performance.
  • Reduces communication overhead significantly.
  • In-Browser Screenshot-Sees browser specific issues immediately.
  • Supports Single Page Applications.


  • Upgrades are pro-rated to make use of all features.
  • To work in local development environments, we require service like PageKite.
  • Need to check browser extensions to work in a local environment.
  • Not possible to capture the state of flash objects(video position).


The third on the list is Mobitest, a free tool that enables testers to enter a URL, choose the device they want to run the test for, select the number of tests that are to be run and hit enter. As simple as that. The page is then loaded on a mobile device and detailed information such as the time taken for loading, waterfall charts and the page load video recording are provided. The advantage offered by Mobitest is that tests need only be specified once. Test suites for each platform will be generated automatically. The tool allows developers to specify a single set of tests for applications. These tests can then be used with each platform upon which the application is being developed.

Mobitest Performance Testing Tool


  • Measures page load times on real mobile devices.
  • Captures screenshots during page load, and shows a video visualizing the page load.
  • Runs on iOS, Android and Blackberry, regardless of the hardware – smartphone, tablet or simulator.
  • Once installed, they run in an infinite loop on the device, turning it into a (very) small server.
  • Gives lots of performance statistics such as page load times and average page size along with other statistics.


  • It doesn’t support scripted tests like the desktop agents.
  • Devices test are limited to a few selected Android and iOS models.
  • Network connection can’t be modified, so testing latency is out of question.
  • Can test only public URLs (so anything in stealth mode or behind a firewall doesn’t work).

Apart from these tools, there is another tool we thought of sharing with you as a bonus is Google DevTools, which is a very powerful tool and the device mode makes it an even more indispensable part of the modern web designer’s toolkit. Developers can take advantage of Chrome’s new “Screencast” technology by simply connecting their mobile device via USB and enable “USB Debugging” within the device settings. Google Chrome will take care of the rest by auto discovering your handset and integrating it within the developer tools options. With this, one can connect debug the webpage opened on mobile browsers. This helps developers in rectifying the issues like rendering, debugging remotely and more using desktop browser devtools.

Solution to Prevent error $digest already in progress when calling $scope.$apply( )?

Solution to Prevent error $digest already in progress when calling $scope.$apply( )?

To check if a $digest is already in progress you have to check $scope.$$phase.$scope.$$phase will return “$digest” or “$apply” if a $digest or $apply is in progress. The difference between these states is that $digest will process the watches of the current scope and it’s children, and $apply will process the watchers of all scopes.


If you have 10 different stylesheets for a given design, how would you integrate them into the site?

If you have 10 different stylesheets for a given design, how would you integrate them into the site?

Every CSS file we use on a website will add time to our page load speed. CSS will not care where it is at or how many files it is in. However in most cases we can have a combination of two or more CSS files together.Developers handle this situation in multiple ways. Few of them simple combine by copy pasting one from another.

The other possible way to combine CSS files using YUI Compresser, that combines CSS and minimizes code and is good for performance. Few handle this by using build tools like GRUNT.

One CSS file that contains all the styles of the separate CSS files combined will work just as well and improve the page speed. Putting all of the CSS into one file substantially reduces the amount of time it takes to load our web pages because we are reducing the amount.