TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Madhav Sharma
889
899
39.3k
Not getting output in custom directive in angular JS
May 22 2019 12:05 AM
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<title>AngularJs Adding Directives to Modules Example</title>
<script src=
"http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"
></script>
<script>
var
app = angular.module(
"myApp"
, [])
.controller(
"CustomDirectiveController"
,
function
($scope) {
$scope.Message =
"Custom Directive"
;
});
app.directive(
'myCustom'
,
function
() {
return
{
templet:
"<div>This is my first directive</div>"
,
}
})
</script>
</head>
<body ng-app=
"myApp"
>
<div ng-controller=
"CustomDirectiveController"
>
<div>
<my-custom></my-custom>
</div>
<p> <b>Using directive :</b> <span my-custom></span></p>
</div>
</body>
</html>
Reply
Answers (
1
)
Force javascript to execute function and its sub function
In angular6 i faced the issue regarding API hit while post