I want to pass a value (0 or 1) to another page so i can make an ng if to return a different button. Any help? do i need to pass a parameter from .ts file? first page.html <button ion-tem (click)="goUsers()" *ngIf="editors.length == 0" value="0"> <ion-label> Add editors </ion-label> </button> <button ion-tem (click)="goUsers()" *ngIf="editors.length > 0" value="1"> <ion-label> Add more editors </ion-label> </button> second page.html <button ion-button item-end clear *ngIf="value === '0'"> (click)="addEditor(item)"> Add as Editor </button> <button ion-button item-end clear *ngIf="value ==='1'"> (click)="deleteEditor(item)"> Already an Editor </button>

Member Avatar
Member Avatar
+0 forum 3

I have a function that returns an array of photos and videos from an iOS device's camera roll. The info is returned correctly, however, I'm also needing to return the path to the photo and video which I've been unable to do so far. Here is the code I'm using. The photo and video path code is about 2/3 down this snippet starting with: "if (asset.mediaType == PHAssetMediaTypeImage)": - (void) photos:(CDVInvokedUrlCommand*)command { if (![self isNull:self.photosCommand]) { [self failure:command withMessage:E_PHOTO_BUSY]; return; } self.photosCommand = command; CDVPhotos* __weak weakSelf = self; [self checkPermissionsOf:command andRun:^{ NSArray* collectionIds = [weakSelf argOf:command atIndex:0 withDefault:nil]; NSLog(@"photos: …

Member Avatar
+0 forum 0

Hi, I am not a mobile app developer but recently studying Cordova/PhoneGap for fun. I just studied FireBase and it was really awesome because it can do lots things without running my own server such as user auth/management, DB, file storage etc. But I am just wondering about the right structure in regards of security. Because we only can use html/javascript/css in Cordova, I am not sure about the right structure to implement. Hackers can always change js codes so hiding contents is not possible. For example, if a user has to purchase coins to watch a video. How can …

Member Avatar
+0 forum 0

Hello i want to make a script in Ionic 3 to capture audio and video from device. index.html `<button ion button (click)="captureApp()" id="captureAudio">Capture Audio</button>` index.ts document.addEventListener("deviceready", onDeviceReady, false); function id(element) { return document.getElementById(element); } function onDeviceReady() { navigator.splashscreen.hide(); captureApp = new captureApp(); captureApp.run(); } function captureApp() { } captureApp.prototype = { pictureSource:null, destinationType:null, run:function() { var that = this; id("captureVideo").addEventListener("click", function() { that._captureVideo.apply(that, arguments); }); id("captureAudio").addEventListener("click", function() { that._capureAudio.apply(that, arguments); }); id("captureImage").addEventListener("click", function() { that._captureImage.apply(that, arguments); }); }, _captureVideo:function() { var that = this; navigator.device.capture.captureVideo(function() { that._captureSuccess.apply(that, arguments); }, function() { captureApp._captureError.apply(that, arguments); }, {limit:10}); }, _capureAudio:function() { var that …

Member Avatar
Member Avatar
+0 forum 7

Hi all. I need some help. I want to display username after user has login. I am currently using Visual Studio and Javascript. Not using any PHP page. What should i do? This is my home.html page: <!DOCTYPE html> <html> <head> <!--Customize the content security policy in the meta tag below as needed. Add 'unsafe-inline' to default-src to enable inline JavaScript. For details, see http://go.microsoft.com/fwlink/?LinkID=617521--> <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta name="format-detection" content="telephone=no"> <meta name="msapplication-tap-highlight" content="no"> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> <link rel="stylesheet" type="text/css" href="css/index.css"> …

Member Avatar
Member Avatar
+0 forum 2

I tried to run an Ionic 3 project from existing files using not C++ but Apache/Cordova and i am getting these errors. Idid a Typescript project works fine. But Cordova won't run with Javascript? Severity Code Description Project File Line Suppression State Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\compile_metadata.d.ts 168 Warning No compiler log specified, 'Clean' won't work. ionic2 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets 320 Error TS1139 Build:Type parameter declaration expected. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34 Error TS1109 Build:Expression expected. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34 Error TS1128 Build:Declaration or statement expected. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34 Error TS2304 Build:Cannot find name …

Member Avatar
Member Avatar
+0 forum 6

Apache Cordova is a framework that lets you build mobile applications using HTML5, CSS and Javascript for different mobile platforms. But because the applications you build with this framework live in a layer on the top of the native development tools of the targeted platform, they're slower than equivalent applications that are written using the native development tools. As is mentioned [here](https://en.wikipedia.org/wiki/Apache_Cordova#Design_and_rationale): > However, the use of Web-based technologies leads some Apache Cordova applications to run slower than native applications with similar functionality.[27] Adobe Systems warns that applications may be rejected by Apple for being too slow or not feeling …

Member Avatar
Member Avatar
+0 forum 3

The End.