material
material copied to clipboard
feat(dialog): support using AngularJS 1.5+ components directly
Actual behavior:
- What is the issue? *
$mdDialogservice is not working with angular 1.5 components.
$mdDialog.show({
template: "<task-show task="task"></task-show>",
autoWrap: false,
parent: angular.element(document.body),
targetEvent: ev,
openFrom: {
left: 2500,
top: 0,
width: 50,
height: 500
},
locals:{
task:task
},
closeTo: {
left: 2500,
top: 0,
width: 50,
height: 500
},
resolve: {
module: ['$q', function ($q) {
$ocLazyLoad.load({
name: module.name
});
}]
}
}).then(function (message) {
}, function (cancelmessage) {
//console.log(cancelmessage);
});
May the problem with template, it is not accepting the task as input. which is binding for taskShow component
- What is the expected behavior? It should open an dialog with given component template
CodePen or Steps to reproduce the issue: *
- CodePen Demo which shows your issue :
- Details:
Angular Versions: *
- Angular Version: 1.5.5
- Angular Material Version: 1.0.6
Additional Information:
- Browser Type: chrome
- Browser Version: 50
- OS: ubuntu
- Stack Traces: it clear that task in the input template not coming to controller.
Do not modify the titles or questions. Simply add your responses to the ends of the questions. Add more lines if needed.
As mentioned in https://github.com/angular/material/issues/10508#issuecomment-462543100, any implementation of this will need to ensure that autoWrap works properly with both template and templateUrl.