私はカスタムディレクティブを作成しましたが、ブラウザでレンダリングしようとすると動作しません。私のコードを見て、 。以下は カスタムディレクティブが動作していない/ブラウザでhtmlをレンダリングする
が私のコードであるJS
var app = angular.module('main',[]);
app.controller('servicecntr', function ($scope) {
$scope.name='jagdish';
$scope.changeclick= function(){
$scope.name= $scope.name.split('').reverse().join('');
}
})
app.directive('myDirectives', function(){
return{
restrict:'EA',
scope:false,
template: "<div> this is the print out of name {{name}}" + "onclick the modelPannel is <input type='text' ng-model='name'",
}
})
ディレクティブ –