Powered by Blogger.

Sunday, 11 January 2015

Angularjs

By Shambhu Kumar  |  23:57 1 comment

How to reverse string in angular js

<div ng-controller="secondController">
        <input type="text" ng-model="data.message">
        <h1>{{data.message | toCaps | reverse }}</h1>
</div>
Update to UPPERCASE
myApp.filter('toCaps',function () {
    return function (msg) {
        return msg.toUpperCase();
    }
});
UPDATE to reverse
myApp.filter('reverse',function () {
    return function (msg) {
        return msg.split("").reverse().join("");
    }
});


Author: Shambhu Kumar

Hello, I am Author, decode to know more: In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet.

1 comment:

  1. AngularJS is a toolset for building the framework most suited to your application development. It is fully extensible and works well with other libraries. Every feature can be modified or replaced to suit your unique development workflow and feature needs. Read on to find out how.

    AngularJS Training in Chennai

    ReplyDelete

Recent Articles

© 2014 Learning Java. WP themonic converted by Bloggertheme9. Published By Gooyaabi Templates
TOP