Category Archives: Angularjs

angularjs http cache expire

until the page refresh, according to this site here are the $cacheFactory specs Storage Javascript heap memory Eviction algorithm Least recently used (LRU) Time-to-live until page refresh Support for revalidation No Requires cooperation of remote server No

Posted in Angularjs, Uncategorized | Leave a comment

ui data design

ds/obj to be used shopping cart user/session info token user privilege user preference user address, shipping preference shipping records interested products shipping? data to support all the ui view & operations ui view operations user specific vs. not user specific … Continue reading

Posted in Angularjs, Uncategorized | Leave a comment

how to integrate angularjs file?

modify index.gsp to contain the index.html? how is the default homepage specified? in the url mapping class UrlMappings { static mappings = { “/$controller/$action?/$id?”{ constraints { // apply constraints here } } “/” (controller:”person”, action:”list”) “500”(view:’/error’) } } http://javadeveloper.asia/changing-grails-homepage-to-a-particular-controller-and-action what’s … Continue reading

Posted in Angularjs, Grails | Leave a comment

reactjs vs. angularjs

speed  ng-repeat. When it comes to handling thousands of DOM rows, its wise to go for React than Angular 1 Virtual DOM” of ReactJS taking all the lime light. This is what makes React so popular. DOM operations are pretty expensive,when … Continue reading

Posted in Angularjs | Leave a comment

use JSON in localstorage

localStorage only supports strings. Use JSON.stringify() and JSON.parse(). var names = []; names[0] = prompt(“New member name?”); localStorage.setItem(“names”, JSON.stringify(names)); //… var storedNames = JSON.parse(localStorage.getItem(“names”)); Unexpected token o in JSON at position =>Your data is already an object. No need to … Continue reading

Posted in Angularjs | Leave a comment

ng-repeat index

$index is the index for nested ng-repeat, use $parent <div class=’btn btn-default’ ng-click=”removeItem($index,$parent.$index)”> <table> <tr ng-repeat=”row in rows track by $index” ng-init=”rowIndex = $index”> <td ng-repeat=”column in columns track by $index” ng-init=”columnIndex = $index”> <b ng-if=”rowIndex == columnIndex”>[{{rowIndex}} – {{columnIndex}}]</b> <small … Continue reading

Posted in Angularjs | Leave a comment

angularjs attribute removed by tinyMce

add the following tinyMce init method to address it, extended_valid_elements:’@[ng-repeat|ng-click|ng-model|ng-if|ng-show|ng-hide|ng-controller|ng-bind|ng-disabled|ng-required],tr,td,div,span,img,a,button’,

Posted in Angularjs | Leave a comment