Tahir Hassan's Blog

My Technical Notes

Friday, 21 August 2015

Angular Radio Button Snippet

Given the following markup:

In our controller we can have the statement:

Angular Deferred → Promise Snippet

The following is a snippet demonstration the Angular `$q` service use to create a "Deferred", which, in turn, is used to create a "promise" by calling its `promise` property:

Note that `$http.get` already returns a promise object, therefore you would not do this, but it is good for demonstration purposes.

References

Thursday, 20 August 2015

HTML/CSS for green checkboxes, and Angular loading gif logic

CSS

Remember to change the `/Content/images/` paths.

HTML

Downloads

GIMP - Eraser won't erase

If you are erasing the correct layer and eraser mode is set to normal, then make sure nothing is selected by `Select` → `None`.

Angular Animation - Fading In and Fading Out

To use the below sample, replace `lorem-ipsum` with your own class's name.

To apply this to all elements that are hidden using `ng-hide` and `ng-show`:

ng-click for Button Events

Angular Logic

HTML

ng-options example