Using AngularJS $sce trustAsHtml to display raw HTML to page

In Tutorials

If you need to display raw HTML content to the page view with AngularJS, you can use the $sce service that comes with AngularJS.  $sce stands for Strict Contextual Escaping.  The service has...

read more

How to make a fixed header in CSS

In Tutorials

We are going to make a fixed header using CSS.  The result is as shown where the black header is fixed to the top of the browser even as the page scrolls up. This is the CSS that is used to effect...

read more

Displaying content to page using AngularJS

In Tutorials

To display simple text content to a web page using AngularJS, you use the double curly braces {{ }} to bind AngualrJS expression to elements in the HTML. But first, we do the normal AngularJS...

read more

Using AngularJS ng-click and ng-class

In Tutorials

Continuing from the previous tutorial, we now add a “mark done” button next to each of our list items. 1. This was implemented by adding the button element in our HTML … Note that...

read more

AngularJS ng-model should have a dot

In Tutorials

In our previous tutorial, we have … See that ng-model=”itemToAdd” does not have a dot in it. The AngularJS way is to have a dot somewhere in the value of the ng-model as in...

read more

Example of using the Chrome Developer tool for debugging

In Tutorials

Today, I will show you an example of how you can use Chrome’s developer tool to help you debug and make changes to a website. In this example, we have an WordPress site and we want to replace...

read more

Why ng-model value should contain a dot

In Tutorials

Take our previous tutorial here, which works perfect fine like this shown here… but is not best practice because ng-model value does not contain a dot.  The code looks like this … While...

read more

How to generate AngularJS app with Yeoman

In Tutorials

To generate an skeleton AngularJS startup app with Yeomon, we use the npm install to install yeoman and bower first.  See tutorial on npm.  We now assume that you have yeoman and bower. 1. First...

read more

Using “Controller as” syntax in AngularJS

In Tutorials

Continuing directly from the last tutorial, we now use the “Controller as” syntax.  This eliminate the $scope parameter passing and hence is another way to solve the minification issue...

read more

Learn Web Tutorials is hosted by Hostmonster and design based on Wordpress template by Elegant Themes
All contents are opinions and are copyrighted and may contain display ads and ad links for which site may receive revenues from.
See Terms of Use and Privacy Policy.