könnten Sie mir bitte sagen, wie in Winkel Objekte in der Liste anhängen? I XSLT-Transformation bin mit erster dann möchte ich Artikel in der Liste auf die Schaltfläche hinzufügen here klicken ist mein Codewie anfügen von Elementen in der Liste in eckigen?
Auf Schaltfläche klicken Ich möchte nur "Test"
hinzufügen Element in Liste.
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" doctype-public="XSLT-compat" omit-xml-declaration="yes" encoding="UTF-8" indent="yes"/>
<xsl:template match="list">
<hmtl ng-app="app">
<head>
<title>New Version!</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.5/angular.js"></script>
<script>
angular.module('app',[]).controller('cntr',function($scope){
$scope.name="dd";
$scope.append =function(){
alert('append');
}
});
</script>
</head>
<body>
<div ng-controller="cntr">
{{4+6}}
<ul>
<xsl:apply-templates select="name"/>
</ul>
<button ng-click="append()">Append</button>
</div>
</body>
</hmtl>
</xsl:template>
<xsl:template match="name">
<li>
<xsl:value-of select="."/>
</li>
</xsl:template>
</xsl:transform>
data.xml
<list>
<name>A new XSLT engine is added: Saxon 9.5 EE, with a namecense (thank you Michael Kay!)</name>
<name>XSLT 3.0 support when using the new Saxon 9.5 EE engine!</name>
<name>Preview your result as HTML when doctype is set to HTML (see this example)</name>
<name>Preview your result as PDF when doctype is set to XML and your document starts with root element of XSL-FO. Apache FOP is used to generate the PDF</name>
<name>Added some namenks to useful XSLT sites</name>
</list>
jede Aktualisierung
Bitte entfernen Sie das Tag 'angular' und es richtet sich an Angular 2/4. Ihre Frage bezieht sich auf AngularJs, daher ist 'angularjs' ausreichend. –