Hi All,
I have implemented couple of things in Angular Js in Lotus notes. I would like to share the same with you all.
Scenario :
How to open the the multiple document(using UNID) in to frontend using Angular JS
Code :
* This is my HTML, in this there is a directives called "ng-click", this will call the function "Iframe Model" and passing the UNID,and status of the document like EDITDOC or OPENDOc or OPENFORM
<a data-toggle="modal" ng-click='IframeModel(Value1.UNID,"EDITDOCUMENT")'><Computed Value></a>
* That function i have written in angular JS, Here,based on the parameter it is choosing the IFRAM, and store the same in to the $Scope.
scope.IframeModel = function(srcURL,status){
if (status=="EDITDOCUMENT")
{
$scope.renderIframe = '<iframe id="Iframe1" width="600" height="350" src="0/'+ srcURL +"?"+status+'"></iframe>';
}
else if(status=="OPENFORM"){
$scope.renderIframe = '<iframe id="Iframe1" width="600" height="350" src="'+ srcURL +"?"+status+'"></iframe>';
}
else{
$scope.renderIframe = '<iframe id="Iframe1" width="600" height="300" src="'+ srcURL +"?"+status+'"></iframe>';
}
}
This is the another directives which helps to bind the HTML from JS, In the above function we are storing in to the scope variable and binding the same in to the another directives called "ng-bind-html-unsafe". This bind directives open the URL at fontend
<div ng-bind-html-unsafe="renderIframe"></div>
I have implemented couple of things in Angular Js in Lotus notes. I would like to share the same with you all.
Scenario :
How to open the the multiple document(using UNID) in to frontend using Angular JS
Code :
* This is my HTML, in this there is a directives called "ng-click", this will call the function "Iframe Model" and passing the UNID,and status of the document like EDITDOC or OPENDOc or OPENFORM
<a data-toggle="modal" ng-click='IframeModel(Value1.UNID,"EDITDOCUMENT")'><Computed Value></a>
* That function i have written in angular JS, Here,based on the parameter it is choosing the IFRAM, and store the same in to the $Scope.
scope.IframeModel = function(srcURL,status){
if (status=="EDITDOCUMENT")
{
$scope.renderIframe = '<iframe id="Iframe1" width="600" height="350" src="0/'+ srcURL +"?"+status+'"></iframe>';
}
else if(status=="OPENFORM"){
$scope.renderIframe = '<iframe id="Iframe1" width="600" height="350" src="'+ srcURL +"?"+status+'"></iframe>';
}
else{
$scope.renderIframe = '<iframe id="Iframe1" width="600" height="300" src="'+ srcURL +"?"+status+'"></iframe>';
}
}
This is the another directives which helps to bind the HTML from JS, In the above function we are storing in to the scope variable and binding the same in to the another directives called "ng-bind-html-unsafe". This bind directives open the URL at fontend
<div ng-bind-html-unsafe="renderIframe"></div>
No comments:
Post a Comment