{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic/issues/7330","repository_url":"https://api.github.com/repos/driftyco/ionic","labels_url":"https://api.github.com/repos/driftyco/ionic/issues/7330/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic/issues/7330/comments","events_url":"https://api.github.com/repos/driftyco/ionic/issues/7330/events","html_url":"https://github.com/driftyco/ionic/issues/7330","id":165811706,"number":7330,"title":"ionic2 - Popover - Uncaught RangeError: Maximum call stack size exceeded","user":{"login":"virtualit786","id":2112745,"avatar_url":"https://avatars.githubusercontent.com/u/2112745?v=3","gravatar_id":"","url":"https://api.github.com/users/virtualit786","html_url":"https://github.com/virtualit786","followers_url":"https://api.github.com/users/virtualit786/followers","following_url":"https://api.github.com/users/virtualit786/following{/other_user}","gists_url":"https://api.github.com/users/virtualit786/gists{/gist_id}","starred_url":"https://api.github.com/users/virtualit786/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtualit786/subscriptions","organizations_url":"https://api.github.com/users/virtualit786/orgs","repos_url":"https://api.github.com/users/virtualit786/repos","events_url":"https://api.github.com/users/virtualit786/events{/privacy}","received_events_url":"https://api.github.com/users/virtualit786/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/driftyco/ionic/labels/actionsheet","name":"actionsheet","color":"d4c5f9"},{"url":"https://api.github.com/repos/driftyco/ionic/labels/v2","name":"v2","color":"313744"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-15T15:18:19Z","updated_at":"2016-07-15T16:24:23Z","closed_at":"2016-07-15T16:03:23Z","body":"Plunker with issue in action is at http://plnkr.co/edit/me3Uk0GKWVRhZWU0usad?p=preview\r\nSimply tried Popover code from ionic2 documentation and got the following RangeError in both web browser and iOS simulator ,  when clicking any of the buttons. \r\n\r\n \"ionic-angular\": \"2.0.0-beta.10\"\r\n  \"ionic-native\": \"1.3.2\",\r\n\r\nRangeError: Maximum call stack size exceeded.\r\n\r\nHere is the stacktrace from the browser:-\r\n```\r\nEXCEPTION: Error in ./MyPopover class MyPopover - inline template:6:23\r\nbrowser_adapter.js:77 EXCEPTION: Error in ./MyPopover class MyPopover - inline template:6:23BrowserDomAdapter.logError @ browser_adapter.js:77BrowserDomAdapter.logGroup @ browser_adapter.js:87ExceptionHandler.call @ exception_handler.js:58(anonymous function) @ application_ref.js:317schedulerFn @ async.js:132SafeSubscriber.__tryOrUnsub @ Subscriber.js:225SafeSubscriber.next @ Subscriber.js:174Subscriber._next @ Subscriber.js:124Subscriber.next @ Subscriber.js:88Subject._finalNext @ Subject.js:128Subject._next @ Subject.js:120Subject.next @ Subject.js:77EventEmitter.emit @ async.js:120onError @ ng_zone.js:117onHandleError @ ng_zone_impl.js:67e.handleError @ zone.min.js:1e.runGuarded @ zone.min.js:1NgZoneImpl.runInnerGuarded @ ng_zone_impl.js:79NgZone.runGuarded @ ng_zone.js:233outsideHandler @ dom_events.js:20e.invokeTask @ zone.min.js:1e.runTask @ zone.min.js:1invoke @ zone.min.js:1\r\nbrowser_adapter.js:77 ORIGINAL EXCEPTION: RangeError: Maximum call stack size exceededBrowserDomAdapter.logError @ browser_adapter.js:77ExceptionHandler.call @ exception_handler.js:67(anonymous function) @ application_ref.js:317schedulerFn @ async.js:132SafeSubscriber.__tryOrUnsub @ Subscriber.js:225SafeSubscriber.next @ Subscriber.js:174Subscriber._next @ Subscriber.js:124Subscriber.next @ Subscriber.js:88Subject._finalNext @ Subject.js:128Subject._next @ Subject.js:120Subject.next @ Subject.js:77EventEmitter.emit @ async.js:120onError @ ng_zone.js:117onHandleError @ ng_zone_impl.js:67e.handleError @ zone.min.js:1e.runGuarded @ zone.min.js:1NgZoneImpl.runInnerGuarded @ ng_zone_impl.js:79NgZone.runGuarded @ ng_zone.js:233outsideHandler @ dom_events.js:20e.invokeTask @ zone.min.js:1e.runTask @ zone.min.js:1invoke @ zone.min.js:1\r\nbrowser_adapter.js:77 ORIGINAL STACKTRACE:BrowserDomAdapter.logError @ browser_adapter.js:77ExceptionHandler.call @ exception_handler.js:70(anonymous function) @ application_ref.js:317schedulerFn @ async.js:132SafeSubscriber.__tryOrUnsub @ Subscriber.js:225SafeSubscriber.next @ Subscriber.js:174Subscriber._next @ Subscriber.js:124Subscriber.next @ Subscriber.js:88Subject._finalNext @ Subject.js:128Subject._next @ Subject.js:120Subject.next @ Subject.js:77EventEmitter.emit @ async.js:120onError @ ng_zone.js:117onHandleError @ ng_zone_impl.js:67e.handleError @ zone.min.js:1e.runGuarded @ zone.min.js:1NgZoneImpl.runInnerGuarded @ ng_zone_impl.js:79NgZone.runGuarded @ ng_zone.js:233outsideHandler @ dom_events.js:20e.invokeTask @ zone.min.js:1e.runTask @ zone.min.js:1invoke @ zone.min.js:1\r\nbrowser_adapter.js:77 RangeError: Maximum call stack size exceeded\r\n    at _baseExtend (util.js:47)\r\n    at _baseExtend (util.js:59)\r\n    at _baseExtend (util.js:59)\r\n    at _baseExtend (util.js:59)\r\n    at _baseExtend (util.js:59)\r\n    at _baseExtend (util.js:59)\r\n    at _baseExtend (util.js:59)\r\n    at _baseExtend (util.js:59)\r\n    at _baseExtend (util.js:59)\r\n    at _baseExtend (util.js:59)BrowserDomAdapter.logError @ browser_adapter.js:77ExceptionHandler.call @ exception_handler.js:71(anonymous function) @ application_ref.js:317schedulerFn @ async.js:132SafeSubscriber.__tryOrUnsub @ Subscriber.js:225SafeSubscriber.next @ Subscriber.js:174Subscriber._next @ Subscriber.js:124Subscriber.next @ Subscriber.js:88Subject._finalNext @ Subject.js:128Subject._next @ Subject.js:120Subject.next @ Subject.js:77EventEmitter.emit @ async.js:120onError @ ng_zone.js:117onHandleError @ ng_zone_impl.js:67e.handleError @ zone.min.js:1e.runGuarded @ zone.min.js:1NgZoneImpl.runInnerGuarded @ ng_zone_impl.js:79NgZone.runGuarded @ ng_zone.js:233outsideHandler @ dom_events.js:20e.invokeTask @ zone.min.js:1e.runTask @ zone.min.js:1invoke @ zone.min.js:1\r\nbrowser_adapter.js:77 ERROR CONTEXT:BrowserDomAdapter.logError @ browser_adapter.js:77ExceptionHandler.call @ exception_handler.js:74(anonymous function) @ application_ref.js:317schedulerFn @ async.js:132SafeSubscriber.__tryOrUnsub @ Subscriber.js:225SafeSubscriber.next @ Subscriber.js:174Subscriber._next @ Subscriber.js:124Subscriber.next @ Subscriber.js:88Subject._finalNext @ Subject.js:128Subject._next @ Subject.js:120Subject.next @ Subject.js:77EventEmitter.emit @ async.js:120onError @ ng_zone.js:117onHandleError @ ng_zone_impl.js:67e.handleError @ zone.min.js:1e.runGuarded @ zone.min.js:1NgZoneImpl.runInnerGuarded @ ng_zone_impl.js:79NgZone.runGuarded @ ng_zone.js:233outsideHandler @ dom_events.js:20e.invokeTask @ zone.min.js:1e.runTask @ zone.min.js:1invoke @ zone.min.js:1\r\nbrowser_adapter.js:77 DebugContext {_view: _View_MyPopover0, _nodeIndex: 15, _tplRow: 6, _tplCol: 23}BrowserDomAdapter.logError @ browser_adapter.js:77ExceptionHandler.call @ exception_handler.js:75(anonymous function) @ application_ref.js:317schedulerFn @ async.js:132SafeSubscriber.__tryOrUnsub @ Subscriber.js:225SafeSubscriber.next @ Subscriber.js:174Subscriber._next @ Subscriber.js:124Subscriber.next @ Subscriber.js:88Subject._finalNext @ Subject.js:128Subject._next @ Subject.js:120Subject.next @ Subject.js:77EventEmitter.emit @ async.js:120onError @ ng_zone.js:117onHandleError @ ng_zone_impl.js:67e.handleError @ zone.min.js:1e.runGuarded @ zone.min.js:1NgZoneImpl.runInnerGuarded @ ng_zone_impl.js:79NgZone.runGuarded @ ng_zone.js:233outsideHandler @ dom_events.js:20e.invokeTask @ zone.min.js:1e.runTask @ zone.min.js:1invoke @ zone.min.js:1\r\nzone.min.js:1 Uncaught EXCEPTION: Error in ./MyPopover class MyPopover - inline template:6:23\r\nORIGINAL EXCEPTION: RangeError: Maximum call stack size exceeded\r\nORIGINAL STACKTRACE:\r\nRangeError: Maximum call stack size exceeded\r\n    at _baseExtend (http://localhost:8100/build/js/app.bundle.js:75863:21)\r\n    at _baseExtend (http://localhost:8100/build/js/app.bundle.js:75875:17)\r\n    at _baseExtend (http://localhost:8100/build/js/app.bundle.js:75875:17)\r\n    at _baseExtend (http://localhost:8100/build/js/app.bundle.js:75875:17)\r\n    at _baseExtend (http://localhost:8100/build/js/app.bundle.js:75875:17)\r\n    at _baseExtend (http://localhost:8100/build/js/app.bundle.js:75875:17)\r\n    at _baseExtend (http://localhost:8100/build/js/app.bundle.js:75875:17)\r\n    at _baseExtend (http://localhost:8100/build/js/app.bundle.js:75875:17)\r\n    at _baseExtend (http://localhost:8100/build/js/app.bundle.js:75875:17)\r\n    at _baseExtend (http://localhost:8100/build/js/app.bundle.js:75875:17)\r\nERROR CONTEXT:\r\n[object Object]e.runTask @ zone.min.js:1invoke @ zone.min.js:1\r\n```\r\n\r\nHere is the relevant code \r\n\r\n```\r\nimport {Component} from '@angular/core';\r\nimport {ViewController,NavController,NavParams,Popover} from 'ionic-angular';\r\nimport {PressDirective} from './press.gesture.directive';\r\n\r\n@Component({\r\n  template: `\r\n    <ion-list>\r\n      <ion-list-header>Ionic</ion-list-header>\r\n      <button ion-item (click)=\"close()\">Learn Ionic</button>\r\n      <button ion-item (click)=\"close()\">Documentation</button>\r\n      <button ion-item (click)=\"close()\">Showcase</button>\r\n      <button ion-item (click)=\"close()\">GitHub Repo</button>\r\n    </ion-list>\r\n  `\r\n})\r\n\r\nexport class MyPopover {\r\n  constructor(private viewCtrl:ViewController) {\r\n  }\r\n  close() {\r\n    this.viewCtrl.dismiss();\r\n  }\r\n}\r\n\r\n@Component({\r\n  templateUrl: 'build/pages/chat/chat-detail.html'\r\n  , directives: [PressDirective]\r\n\r\n})\r\nexport class ChatDetailsPage {\r\n  constructor(private navParams:NavParams, private navController:NavController) {  }\r\n  onLongPress($event) {\r\n    let popover = Popover.create(MyPopover);\r\n    this.navController.present(popover, {\r\n      ev: $event\r\n    });\r\n  }\r\n}\r\n\r\n```\r\n\r\nAnd the PressGesture directive code used is below :-\r\n```\r\nimport {Directive, ElementRef, OnInit, OnDestroy, Output, EventEmitter} from '@angular/core';\r\nimport {Gesture} from 'ionic-angular/gestures/gesture';\r\n\r\n@Directive({\r\n  selector: '[longPress]'\r\n})\r\nexport class PressDirective implements OnInit, OnDestroy {\r\n  el: HTMLElement;\r\n  pressGesture: Gesture;\r\n\r\n  @Output()\r\n      longPress: EventEmitter<any> = new EventEmitter<any>();\r\n\r\n  constructor(el: ElementRef) {\r\n    this.el = el.nativeElement;\r\n  }\r\n\r\n  ngOnInit() {\r\n    this.pressGesture = new Gesture(this.el);\r\n    this.pressGesture.listen();\r\n    this.pressGesture.on('press', e => {\r\n      console.log('PressDirective::pressed!!');\r\n      this.longPress.emit(e);\r\n    });\r\n    this.pressGesture.on('tap', e => {\r\n      console.log('PressDirective::tapped!');\r\n    });\r\n  }\r\n\r\n  ngOnDestroy() {\r\n![screen shot 2016-07-15 at 8 29 08 pm](https://cloud.githubusercontent.com/assets/2112745/16879929/2dd5116a-4acc-11e6-8d7b-d67424ca6ec7.png)\r\n\r\n    this.pressGesture.destroy();\r\n  }\r\n}\r\n```\r\nRelavant HTML is\r\n```\r\n<ion-header>\r\n</ion-header>\r\n\r\n<ion-content class=\"detail\" (click)=\"dismissPopup($event)\">\r\n  <div  padding>\r\n    <ion-input type=\"text\" value=\"Long Press\" (longPress)=\"onLongPress($event)\"></ion-input>\r\n  </div>\r\n</ion-content>\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic/issues/comments/232999430","html_url":"https://github.com/driftyco/ionic/issues/7330#issuecomment-232999430","issue_url":"https://api.github.com/repos/driftyco/ionic/issues/7330","id":232999430,"user":{"login":"virtualit786","id":2112745,"avatar_url":"https://avatars.githubusercontent.com/u/2112745?v=3","gravatar_id":"","url":"https://api.github.com/users/virtualit786","html_url":"https://github.com/virtualit786","followers_url":"https://api.github.com/users/virtualit786/followers","following_url":"https://api.github.com/users/virtualit786/following{/other_user}","gists_url":"https://api.github.com/users/virtualit786/gists{/gist_id}","starred_url":"https://api.github.com/users/virtualit786/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtualit786/subscriptions","organizations_url":"https://api.github.com/users/virtualit786/orgs","repos_url":"https://api.github.com/users/virtualit786/repos","events_url":"https://api.github.com/users/virtualit786/events{/privacy}","received_events_url":"https://api.github.com/users/virtualit786/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T16:24:22Z","updated_at":"2016-07-15T16:24:22Z","body":"@jgw96 But is not for android only ! I am experiencing it in browser and as well as iOS! "}}
{"actor":{"display_login":"virtualit786"}}