Skip to content

Instantly share code, notes, and snippets.

View alejandrodazal's full-sized avatar

Alejandro Esteban Daza alejandrodazal

View GitHub Profile
angular.module('utils.filters', [])
.filter('wrapText', wrapText);
function wrapText($sce) {
return function (source, needle, wrap, strict) {
var regex;
if (typeof needle === 'string') {
regex = new RegExp(needle, "gi");
} else {
angular.module('utils.filters', [])
.filter('wrapText', wrapText);
function wrapText($sce) {
return function (source, needle, wrap, strict) {
var regex;
if (typeof needle === 'string') {
regex = new RegExp(needle, "gi");
} else {
// code here...
- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
{
// return [super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType];
NSURL *url = [request URL];
NSString *path = [url path];
// Intercept the external http requests and forward to Safari.app
// Otherwise forward to the PhoneGap WebView