I'm using angularJS in an asp.net user control (UC), but, unfortunately, when I try to add my UC in my page, the whole page part that uses angular stops working. I tried to use angular reference separate from UC and the page, but no success.
Page Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Abc.aspx.cs" Inherits="WebApplication1.Abc" %>
<%@ Register Src="~/filterUC.ascx" TagPrefix="uc1" TagName="filterUC" %>
<!doctype html>
<html>
<head>
</head>
<body>
<uc1:filterUC runat="server" ID="filterUC" />
<div>
<label>Name:</label>
<input type="text" ng-model="myModel" placeholder="Enter a name here">
<hr>
<h1>Hello {{myModel}}!</h1>
</div>
</body>
</html>
UC code:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="filterUC.ascx.cs" Inherits="WebApplication1.filterUC" %>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
<div ng-app>
<label>Name:</label>
<input type="text" ng-model="yourName" placeholder="Enter a name here">
<hr>
<h1>Hello {{yourName}}!</h1>
</div>
How can I accomplish it?
Regards.