angularjs - Angular with bootstrap: set modal window "id" property -
The following (), I'm trying to set the "id" property of my modal window (to set up custom css Properties).
In my opinion:
& lt; Script type = "text / ng-template" id = "myModalContent.html" & gt; & Lt; Div class = "modal-header" & gt; ... & lt; / Div & gt; & Lt; / Script & gt;
In my controller: OpenModal_AddDevice function (size) {
var modalInstance = $ modal.open ({templateUrl: 'myModalContent.html', Controller: 'ModalInstanceCtrl', size: size, resolution: {device: function () {return $ scope.selectedDevice;}}});
The result of:
& lt; Div class = "modal-dialog" ng-class = "{'modal-sm': size =" SM "," model-LG ": size == 'LG'}" & gt; & Lt; Div class = "modal-content" modal-transclusion = "" & gt; & Lt; / Div & gt;
The result I'm trying to get:
& lt; Div id = "SOME_ID" class = "modal-dialog" ng-class = "{'modal-sm': size == 'SM', 'model-LG': size == 'LG'}" & gt; Div class = "modal-content" modal-transclude = "" & gt; & Lt; / Div & gt; With Docs you can use the Window class feature to add custom CSS classes
P>
windowClass
- Added additional CSS class (s) in a model window template
If you want to set an ID specifically for any other reason , You can override the window template using the following:
windowTemplateUrl
- The path to a template, which is used for the model Window template is running on
Comments
Post a Comment