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
CHAITANYA KIRAN KASANI
NA
335
133.1k
Dynamically Loading Url using ng-include is comment
Mar 21 2016 7:35 AM
AngularJS - Dynamically Loading template Url using ng-include is commenting or not displaying(by inspecting) when application is running .
How can i rectify this commenting
I have code as below:
templateController.js
======================
var app = angular.module("myApp", []);
app.controller("MyCtrl", function ($scope) {
function onChange() {
// alert("Selected Value: " + $("#Category").val() + "\nSelected Text: " + $("#Category").data("kendoDropDownList").text());
$scope.templateUrl = $("#Category").val();
return $scope.templateUrl;
};
Categorydata = [
{ CategoryId: "'http://localhost/IncludeDynamicTemplateUrl/Receipts.html'", CategoryName: "Receipts" },
{ CategoryId: "'http://localhost/IncludeDynamicTemplateUrl/Payments.html'", CategoryName: "Payments" },
{ CategoryId: "'http://localhost/IncludeDynamicTemplateUrl/Loans.html'", CategoryName: "Loans" }
];
$("#Category").kendoDropDownList({
dataTextField: "CategoryName",
dataValueField: "CategoryId",
dataSource: Categorydata,
index: 0,
change: onChange
});
});
Default.html
=============
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<title></title>
</head>
<body ng-controller="MyCtrl">
<div class="form-group">
<label for="receipts">Category Names :</label>
<div>
<select id="Category" />
</div>
</div>
<div>
<div ng-include="templateUrl"></div>
</div>
</body>
</html>
Reply
Answers (
1
)
how to show in all browser that pop up is active or not
how to get value from one page to another using jquery