I have a Django project (that I created using PyCharm IDE). I have two HTML files and below is the code I have in those files.
-- header.html
<!DOCTYPE html>
<html lang="en" >
<head>
<title>This is my title</title>
<meta charset="UTF-8">
{% load staticfiles %}
<link rel="stylesheet" href="{% static 'css/style.css' %}" type="text/css"/>
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<script data-require="angular.js@*" data-semver="1.4.0-beta.6" src="https://code.angularjs.org/1.4.0-beta.6/angular.js"></script>
<script src="{% static 'js/script.js' %}"></script>
-- home.html
<html ng-app="myApp">
{% extends "query/header.html" %}
{% block content %}
<p>Hey what's up</p>
<select name="dropDown" ng-model="data.dropDown" >
{% for num in list %}
<option value="num">
{{ num }}
</option>
{% endfor %}
</select>
<p>You chose: {{ data.dropDown }}</p>
{% endblock %}
</html>
In my home.html, I have a dropdown that I created using <select>tag and is populated using a Python list. I am using ng-model in my select tag in order to get what user chooses in the dropdown and display it below but for some reason, it's not displaying anything when I select an option in the dropdown.
Also, in my PyCharm IDE, inside home.html, ng-app and ng-model are highlighted and I get a warning saying that Attribute ng-app/ng-model is not allowed here
Can you please tell me what I am doing wrong here?