Skip to main content

Posts

Showing posts with the label html5

Form Validation in Angular.js - Quick and Simple method On Submit click - HTML5 Validation vs AngularJs Validation

Form Validation Before AngularJs:  Validation done in java script or mostly with JQuery Validation . JQuery Validation uses Html 'Class' attribute of any Html element to implement Validations, like Class = " required  " And there were many different libraries to do simple and fancy validation - highlights in JQuery.  HTML5 Validation: In HTML5 you can add many element types and attributes like below to a HTML element for validations. InputTypes: email, url, number, color , date, datetime, datetime-local, month, search, tel, time, week, range Ex:  Date: <input type="date" name="date" required>  this will show a text box with a dropdown arrow for 'DatePicker' provided by the HTML5 supported browsers. Attributes:    required, pattern, placeholder, max, min, size,  All these validations and required fields are enforced by the HTML5 supported Browsers when you click on Submit button. Submit button OnClick - event will ...

Angular.js Error: Unknown provider: CompanyProvider<- Company

ERROR: Error : Unknown provider : CompanyProvider <- Company   Anguar.js throws this kind of error related to the Model (here it is Company) name / module name.   FIX:      1. Check the defined model is existing in the Models folder , in the mmmm.Json file and check the Model Name.   { "name": "Company", "base": "PersistedModel", "idInjection": true, "properties": { "name": { "type": "string", "required": true } }   2. Check the resources file created by $resource for the model name.   3. If you are using "Add New" form, make sure use a unique empty object name for that.   like, instead 'Company' or 'company' - use 'newCompany' that help avoid miss matching local objects with Model references.   .controller('AddCompanyController', ['$scope', ' Company ', '$state...

Hr (horizontal line) style in FireFox vs IE vs Chrome - Simplest Simple feature doesn't work same - Hope you can save some time.

ISSUE: I wasted few minutes figuring out World's simplest simple issue 'drawing a single line' with 1pixel width and a color in html that looks same in at least 3 browsers ( Firefox, IE, Chrome ) I just want to do a simple  code like, < hr style = " color : #ff6a00 ; " >  - Firefox: Shows the line with given color but with a border. (Thats good. 4 Stars for Firefox team) - IE: Shows line with default 'gray' with default width - Chrome: Shows line with default 'gray' with default width   (depending on the browser you are looking - the above line will show as mentioned above) < hr style = " color : #ff6a00 ; height : 1 px ; border : 0 ; width : 100 % ; " >   All 3 Browsers: No Show - No line Even if you try increasing border and height,  < hr style = " color : #ff6a00 ; height : 1 0px ; border : 3px; width : 100 % ; " > it will not show the line. FIX:  You have to use the backgro...