Giter VIP home page Giter VIP logo

Comments (5)

mendhak avatar mendhak commented on August 18, 2024

To control yourself when it's called, you can call the method directly from the controller,

So first you do the setup:

<div ng-intro-method="CallMe" ...

Then in your controller,

$scope.CallMe()

But because the DOM elements aren't necessarily ready, you need to do it in a timeout.

    $timeout(function() { $scope.CallMe();},0);

I've got an example in a plunkr here:

http://plnkr.co/edit/yovnsnXcoUE04Fix5L4A?p=preview

Have a look at index.html then script.js.

The other way, I'll add an option in the attributes for it in a few minutes.

from angular-intro.js.

mendhak avatar mendhak commented on August 18, 2024

I've added an option, ng-intro-autostart="true" in this commit

dcabbcf

If you set it, ng-intro-autostart="true", the intro should autostart.

from angular-intro.js.

godratio avatar godratio commented on August 18, 2024

Sweet that will do the trick.

from angular-intro.js.

godratio avatar godratio commented on August 18, 2024

I know I closed this issue but I think autostart does not work properly. Sometimes the dom is not fullly loaded when it runs.

from angular-intro.js.

mendhak avatar mendhak commented on August 18, 2024

In this commit:
244d4f3

I've added a $timeout around the call. This should make the directive wait until the DOM is ready, then it will invoke the auto start.

from angular-intro.js.

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.