Navigation

    Monaca & Onsen UI
    • Register
    • Login
    • Search
    • Tags
    • Users
    • Blog
    • Playground
    1. Home
    2. Omar Hassan
    O
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    Omar Hassan

    @Omar Hassan

    0
    Reputation
    12
    Posts
    1717
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Omar Hassan Follow

    Posts made by Omar Hassan

    • RE: document.addEventListener("show" is not working in cordova with onsen

      @Omar-Hassan said:

      show

      initpage works well but i need show not init.

      posted in Developer Corner
      O
      Omar Hassan
    • RE: document.addEventListener("show" is not working in cordova with onsen

      I have the same issue, Show event is not fired, i am using onsen 1.x,
      Here is my code,

        document.addEventListener("show", function (event) {
                      if (event.target.id == "service_requests-page") {
                         alert("init service_requests-page");
                      }
                  }, false);
      

      Any one can help ?

      posted in Developer Corner
      O
      Omar Hassan
    • RE: cordova google map plugin not shown map

      I have the same issue, Show event is not fired, i am using onsen 1.x,
      Here is my code,

        document.addEventListener("show", function (event) {
                      if (event.target.id == "service_requests-page") {
                         alert("init service_requests-page");
                      }
                  }, false);
      
      

      Any one can help ?

      posted in Developer Corner
      O
      Omar Hassan
    • RE: Sneak Peeking 1.2.2: Lazy Repeat (or Infinite Scrolling)

      How we can calculate item height dynamically in calculateItemHeight ? Could you please give us an example ?

      posted in Monaca & Onsen UI Articles
      O
      Omar Hassan
    • RE: Dynamic HTML error Onsen 2

      Dears Onsen ui developers , No fix for this issue ?

      posted in Onsen UI
      O
      Omar Hassan
    • RE: Dynamic HTML error Onsen 2

      @munsterlander

      Thanks for your cooperation,

      Waiting for someone help in this.

      posted in Onsen UI
      O
      Omar Hassan
    • RE: Dynamic HTML error Onsen 2

      @Fran-Diox

      If i changed your example to this

       var onsItem = document.createElement('ons-list-item');
                  onsItem.setAttribute('modifier', "chevron");
                  onsItem.setAttribute('ng-click', 'functionName()');
                  onsItem.innerHTML = '<img src="" alt="something here" />';
                  ons.compile(onsItem);
      
                  var ccc = document.getElementById('listIDorSomething');
                  ccc.appendChild(onsItem);
      

      It give me this error

      Error: AngularJS Scope is null. Argument DOM element must be attached in DOM document.
          at Object.ons.compile (angular-onsenui.js:472)
          at Scope.$scope.login_click (app.js:171)
          at angular.js:13924
          at angular-onsenui.js:11397
          at Scope.$eval (angular.js:16052)
          at Scope.$apply (angular.js:16152)
          at ons-button.listener (angular-onsenui.js:11396)
          at defaultHandlerWrapper (angular.js:3346)
          at ons-button.eventHandler (angular.js:3334)(anonymous function) @ angular.js:12520
      17:4400/plugins/cordova-plugin-whitelist/whitelist.js:25 No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.
      
      posted in Onsen UI
      O
      Omar Hassan
    • RE: Dynamic HTML error Onsen 2

      @Fran-Diox
      Here is a sample from my generated HTML,

      <ul class="tabs">
         <li class="current" ng-click="oneClick(0)">ملاحظات</li>
         <li class="current" ng-click="oneClick(1)">عام</li>
      </ul>
      <br>
      <div class="form" ng-show="shouldShow(0)"></div>
      <div class="form" ng-show="shouldShow(1)">
         <p>رصيد أيام الإجازة</p>
         <br><input id="BalanceVactionDays" value="7" name="BalanceVactionDays" type="text" class="text-input" onkeypress="return event.charCode &gt;= 48 &amp;&amp; event.charCode &lt;= 57" ng-init="BalanceVactionDays= 7" ng-model="BalanceVactionDays">
         <div class="error-msgs" ng-messages="requestDetailsFrom.BalanceVactionDays.$error">
            <p ng-message="emptyValidator">Required nn</p>
         </div>
         <p>مدة الإجازة الفعلية \ يوم</p>
         <br><input id="ActualVacationDays" value="1" name="ActualVacationDays" type="text" class="text-input" onkeypress="return event.charCode &gt;= 48 &amp;&amp; event.charCode &lt;= 57" ng-init="ActualVacationDays= 1" ng-model="ActualVacationDays">
         <div class="error-msgs" ng-messages="requestDetailsFrom.ActualVacationDays.$error">
            <p ng-message="emptyValidator">Required nn</p>
         </div>
      </div>
      
      posted in Onsen UI
      O
      Omar Hassan
    • RE: Dynamic HTML error Onsen 2

      @munsterlander said:
      Yes, it also does ,not work.
      For example here if you chnaged onlick here to be ng-click

      onsItem.setAttribute('ng-click', "functionName()");
      

      it will not work, all things works well in onsen 1.3.

      posted in Onsen UI
      O
      Omar Hassan
    • RE: Dynamic HTML error Onsen 2

      @munsterlander, @Fran Diox

      But all angular directives doesnot work such as ng-click and ng-show,
      Any advise to fix this ?

      posted in Onsen UI
      O
      Omar Hassan