updated to support angularjs as main app framework