When working with Sitecore, it’s common to need content synchronization across environments. Today, I’ll walk you through the steps to sync content from Production to UAT/TEST and vice versa. Steps to Follow 1. Set Up Your Workspace Create a folder on your computer where you will manage the script files and exported data. Open the folder path in PowerShell to begin scripting. We need to run some scripts in PowerShell to update the folder with the basic requirements for syncing content. PS C:\Soft\ContentSync> dotnet new tool-manifest PS C:\Soft\ContentSync> dotnet nuget add source -n Sitecore https://nuget.sitecore.com/resources/v3/index.json PS C:\Soft\ContentSync> dotnet tool install Sitecore.CLI PS C:\Soft\ContentSync> dotnet sitecore cloud login If the above error occurs, you will need to run a different command to resolve the issue. PS C:\Soft\ContentSync> dotnet sitecore init now, Again run above command to open and authenticate with XM Cloud. It will be there a...
AngularJS
always operates on DOM node. We are not able to do any notice when HTML page
loads. It parse automatically into DOM.
Compilation
of HTML happens in three steps which is pointed below.
1. In
angularjs $compile is use to traverse the DOM and looks for directive. It find each
directive and add it into the list of directive.
2. It
is use to sort the list of directive by their priority when the entire DOM has
been traversed. Each directive has own compilation function to be executed and
each have chance to modify by itself. Each compile function return linking
function and then it is use to composed into combined linking function and
return it.
3. $compile
relations the template with the choice by calling the joint linking function
from the earlier step. This in turn will request the connecting function of the
separate directives, process listeners on the elements and set up $watch with
the scope as each directive is organised to do.
var
$compile = ...; // injected into your code
var
scopeData = ...;
var
parentData = ...; // DOM element where the compiled template can be appended
var
html = '<div ng-bind="exp"></div>';
//
Step 1: It parse HTML into DOM element
var
templateData = angular.element(html);
//
Step 2:It compile the template
var
linkFunction = $compile(templateData);
//
Step 3: link the compiled template with the scope.
var
element = linkFn(scopeData);
//
Step 4: Append to DOM (optional)
parent.appendChild(element);
|
Comments
Post a Comment