-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dialog controller not working #33
Comments
Main page defined app, modal dialog defined controller. Main page' controller is ok, but modal dialog's controller is not working. |
Dialog's directive is ok, but modal dialog's controller is not working. |
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> |
This controller dosnt work when I defined in template.html |
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> |
|
@vlapo yes |
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). |
Dialog controller not working
The text was updated successfully, but these errors were encountered: