Open sp90 opened 7 years ago
ping
Can somebody provide an example of this? I need help to try communicate NgDialog and a Component. Thanks!
@bufface to solve my problem, I declared a value to scope
property. Like this:
ngDialog.open({
controllerAs: '$ctrl',
scope: this.$scope,
template: this.$templateCache.get('./modal.html')
})
it's not ideal, but resolves "palliatively"...
I'll try this @fernahh. It's a pity that does not support components. Maybe next release?
@sp90
You mean like this?
ngDialog.open({
template: '<my-component></my-component>',
plain: true
});
I couldn't try this, but I think it will works. Thanks @cseale
@cseale is it possible to pass values down into the component with this?
Hi Everybody is it possible to do something like
var anyJsobject = {};
var text = "i am the best text"
ngDialog;.open({
template: '
I can't pass the anyObject .... Do you have a solution ??
Ok after reading the doc we can do something like:
$newScope = $scope.$new(true); $newScope.data = {...}; $newScope.text = "Some text" ngDialog;.open({ template: ''<my-component data="data", text="text">, plain: true, scope: $newScope });
Is it on the roadmap to get it working with components, so instead of parsing in controller and templateurl, just to parse component name?