Giter Site home page Giter Site logo

Comments (9)

shangdiyisi avatar shangdiyisi commented on June 24, 2024

Main page defined app, modal dialog defined controller. Main page' controller is ok, but modal dialog's controller is not working.

from ngbootbox.

shangdiyisi avatar shangdiyisi commented on June 24, 2024

Dialog's directive is ok, but modal dialog's controller is not working.

from ngbootbox.

shangdiyisi avatar shangdiyisi commented on June 24, 2024

@eriktufvesson @vlapo

from ngbootbox.

vlapo avatar vlapo commented on June 24, 2024

Hi, do you have any console output?

This example works for me:

script.js

var app = angular.module('myApp', ['ngBootbox']);

app.controller('MyCtrl', function($scope, $rootScope){
});

app.controller('DialogCtrl', function($scope){
    $scope.testVar = 'Variable :)';
});

index.html

<a title="Edit" href=""
      ng-bootbox-custom-dialog
      ng-bootbox-custom-dialog-template="./template.html">Update This</a>

template.html

<form ng-controller="DialogCtrl">
    {{testVar}}
</form>

from ngbootbox.

shangdiyisi avatar shangdiyisi commented on June 24, 2024

@vlapo

app.controller('DialogCtrl', function($scope){
    $scope.testVar = 'Variable :)';
});

This controller dosnt work when I defined in template.html

from ngbootbox.

vlapo avatar vlapo commented on June 24, 2024

Define in template.html ??? Like this ?

<script type="text/javasctript">
app.controller('DialogCtrl', function($scope){
    $scope.testVar = 'Variable :)';
});
</script>
<form ng-controller="DialogCtrl">
    {{testVar}}
</form>

from ngbootbox.

shangdiyisi avatar shangdiyisi commented on June 24, 2024
Argument 'outsideUrlSwitchController' is not a function, got undefined

from ngbootbox.

shangdiyisi avatar shangdiyisi commented on June 24, 2024

@vlapo yes

from ngbootbox.

vlapo avatar vlapo commented on June 24, 2024

This is no issue of ngBootbox. You just dont know hot to work with javascript or angular.

Javascript in templates html is not resolved, and app variable is undefined too. Define it as in my example (one js file included to index.html).

from ngbootbox.

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.