GithubHelp home page GithubHelp logo

Comments (4)

cramrov avatar cramrov commented on May 30, 2024

Hi raikage,

I use it within a "script" tag like this inside a template, and it works for me:

<script id="login.html" type="text/ng-template">
    <div class="modal">

      <header class="bar bar-header bar-positive">
        <h1 class="title">Log-in</h1>
        <button class="button button-clear" ng-click="closeModal()">Cancel</button>
      </header>

      <content has-header="true" 
        has-subheader="false"
        has-footer="false"
        overflow-scroll="false"
        scroll="false"
        on-refresh="onRefresh()"
        padding="true">

        <div class="list">
          <label class="item item-input">
            <span class="input-label">User</span>
            <input type="text" placeholder="Type here">
          </label>
          <label class="item item-input">
            <span class="input-label">Password</span>
            <input type="text" placeholder="Type here">
          </label>
          <br/>
          <button class="button button-balanced" ng-click="goTo('somewhere');">Enter</button>
        </div>        

      </content>

    </div>
  </script> 

Inside JS Controller file:

  // Load the modal from the given template URL
  $ionicModal.fromTemplateUrl('login.html', function(modal) {
    $scope.modal = modal;
  }, {
    // Use our scope for the scope of the modal to keep it simple
    scope: $scope,
    // The animation we want to use for the modal entrance
    animation: 'slide-in-up'
  });  

  $scope.openModal = function() {
    $scope.modal.show();
  };
  $scope.closeModal = function() {
    $scope.modal.hide();
  };  

Let me know if it works fine for you.

/marc

from meteor-ionic.

daxreyes avatar daxreyes commented on May 30, 2024

this is what I do loneleeandroo/ngMeteor#9 (comment). put it inside a meteor template tag

<template name="login">
<script id="login.html" type="text/ng-template">
...
</script>
</template>

then putting {{> login}} inside a meteor template tag or body.
Wondering if this is the correct way of doing this or if there is a better way

from meteor-ionic.

cramrov avatar cramrov commented on May 30, 2024

I'm not sure if it's the correct way, but it works!
BTW, it was a mistake in my last example, because I used an old Ionic version. From v0.9.25+ they changed the Ionic Directive Naming (http://ionicframework.com/blog/ionic-directive-prefixes/), so you'll need to change them in your source code and it'll work.

from meteor-ionic.

cramrov avatar cramrov commented on May 30, 2024

I think this issue is solved, so I close it.

from meteor-ionic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.