Im working on an app that uses MVC and angular for routing. Everything works fine. I'm having problem using Bootstrap for the looks inside my ng-view. I have a _Layout.cshtml (base file for layout).
<div class="container body-content">
#RenderBody()
<hr />
<footer>
<p>© #DateTime.Now.Year</p>
</footer>
</div>
<script src="~/js/plugins/jquery/jquery.min.js"></script>
<script src="~/js/plugins/jquery/jquery-ui.min.js"></script>
<script src="~/js/plugins/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="~/js/plugins/bootstrap/bootstrap-datepicker.js"></script>
This is a just a part of the code.
Under views i have a Home Page as follows
<div data-ng-non-bindable>
<div id="home" data-ng-controller="rootViewModel">
<div ng-view >
</div>
</div>
and final i have a view
<div class="page-content-wrap">
<div class="row">
<div class="col-md-12">
<!-- START DEFAULT WIZARD -->
<!-- START WIZARD WITH SUBMIT BUTTON -->
<div class="block">
<h4>Register organization</h4>
<form action="javascript:alert('Submited!');" role="form" class="form-horizontal">
<div class="wizard show-submit">
<ul>
<li>
<a href="#step-5">
<span class="stepNumber">1</span>
<span class="stepDesc">User<br /><small>Personal data</small></span>
</a>
</li>
<li>
<a href="#step-6">
<span class="stepNumber">2</span>
<span class="stepDesc">Contact<br /><small>Information</small></span>
</a>
</li>
</ul>
<div id="step-5">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><strong>One Column</strong> Layout</h3>
<ul class="panel-controls">
<li><span class="fa fa-times"></span></li>
</ul>
</div>
<div class="panel-body">
<p>This is non libero bibendum, scelerisque arcu id, placerat nunc. Integer ullamcorper rutrum dui eget porta. Fusce enim dui, pulvinar a augue nec, dapibus hendrerit mauris. Praesent efficitur, elit non convallis faucibus, enim sapien suscipit mi, sit amet fringilla felis arcu id sem. Phasellus semper felis in odio convallis, et venenatis nisl posuere. Morbi non aliquet magna, a consectetur risus. Vivamus quis tellus eros. Nulla sagittis nisi sit amet orci consectetur laoreet. Vivamus volutpat erat ac vulputate laoreet. Phasellus eu ipsum massa.</p>
</div>
<div class="panel-body">
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Organization name</label>
<div class="col-md-6 col-xs-12">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" class="form-control" data-ng-model="organization.TenantName"/>
</div>
<span class="help-block">The name should be unique, the name should identify your organization</span>
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Phone number</label>
<div class="col-md-6 col-xs-12">
<div class="input-group">
<span class="input-group-addon" ><span class="fa fa-phone"></span></span>
<input type="text" data-ng-model="organization.PhoneNumber" class="form-control" />
</div>
<span class="help-block">Cell number for primary communication</span>
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Email</label>
<div class="col-md-6 col-xs-12">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-envelope"></span></span>
<input data-ng-model="organization.Email" type="text" class="form-control" />
</div>
<span class="help-block">Valid email address</span>
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Description</label>
<div class="col-md-6 col-xs-12">
<textarea data-ng-model="organization.Description" class="form-control" rows="5"></textarea>
<span class="help-block">Briefly describe your organization</span>
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Logo</label>
<div class="col-md-6 col-xs-12">
<input data-ng-model="organization.Logo" type="file" class="fileinput btn-primary" name="filename" id="filename" title="Browse file" />
<span class="help-block">Input type file</span>
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Visibility</label>
<div class="col-md-6 col-xs-12">
<label class="check"><input id="toggle-one" data-ng-model="organization.IsPublic" ng-checked="organization.IsPublic" type="checkbox" class="icheckbox" checked="checked" /> Checkbox title</label>
<span class="help-block">To be visible to every one online check this box</span>
</div>
</div>
</div>
<div class="panel-footer">
<button class="btn btn-default">Clear Form</button>
<button class="btn btn-primary pull-right">Submit</button>
</div>
</div>
</div>
<div id="step-6">
<!--Select license data-->
</div>
</div>
</form>
</div>
<!-- END WIZARD WITH SUBMIT BUTTON -->
</div>
</div>
this view does not load datepicker bootstrap referenced in the layout, but css and angular controllers works fine. but when i remove the view and put it direct to my homepage.cshtml it works fine. the problem is the ng-view. any help will be appreciated. thanks
Related
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Myshop</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css2?family=Abel&display=swap" rel="stylesheet">
</head>
<body>
<style>
.head{
font-family: 'Abel', sans-serif;
}
</style>
{% load static %}
{%for product_list in product_list%} after adding this code the webpage is getting duplicated
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
<li class="nav-item">
<a class="nav-link">Disabled</a>
</li>
</ul>
</div>
</div>
</nav>
<h1 class="head text-center m-4">Premium Watchs</h1>
<div class="container">
<div class="row g-3">
<div class="col-12 col-md-6 col-lg-4">
<div class="card">
<img src='{% static "shop\rolex.jpg" %}' class="card-img-top" alt="A Street in Europe">
<div class="card-body">
<h5 class="card-title">{{product_list.0.Product_name}}</h5>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer interdum odio in felis mattis feugiat. In rhoncus libero magna, ultricies condimentum tortor tempor sit amet.</p>
Go somewhere
</div>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4">
<div class="card">
<img src='{% static "shop\rolex.jpg" %}' class="card-img-top" alt="London">
<div class="card-body">
<h5 class="card-title">London</h5>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer interdum odio in felis mattis feugiat. In rhoncus libero magna, ultricies condimentum tortor tempor sit amet.</p>
Go somewhere
</div>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4">
<div class="card">
<img src='{% static "shop\rolex.jpg" %}' class="card-img-top" alt="New York">
<div class="card-body">
<h5 class="card-title">New York</h5>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer interdum odio in felis mattis feugiat. In rhoncus libero magna, ultricies condimentum tortor tempor sit amet.</p>
Go somewhere
</div>
</div>
</div>
</div>
</div>
{%endfor%}
table
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.2.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous"></script>
</body>
</html>
i am freshener learning django and i am not able to fetch the data from the database so please help me to solve this problem
i want to fetch data from my database to my website
after adding this line of code the webpage is getting duplicated
{%for product_list in product_list%}
models.py
this the code where i created the database it has very random fields as i am making this website to learn django
from django.db import models
class Product(models.Model):
product_id=models.AutoField
product_name=models.CharField(max_length=50)
category=models.CharField(max_length=50, default='')
sub_category=models.CharField(max_length=50, default='')
desc = models.CharField(max_length=500)
price = models.IntegerField(default=0)
pub_date=models.DateField()
images = models.ImageField(upload_to="shop/images",default='')
def __str__(self):
return self.product_name
I am making a dropdown accordion. After adapting my code to the example bellow, everything works fine:
Example: https://codepen.io/CreativeBulma/pen/YbQqoQ
trainingData
[{
"von": "17:00",
"bis": "18:00",
"tag": "Mittwoch",
"trainingsid": 46
},
{
"von": "19:00",
"bis": "21:00",
"tag": "Donnerstag",
"trainingsid": 51
}]
That's how it works:
<div ref={collapsiblesRef} id={`accordion_first2`}>
<div className="card">
<header className="card-header">
<p className="card-header-title">
montaj
</p>
<a href={`#collapsible-card-0`} data-action="collapse" className="card-header-icon is-hidden-fullscreen" aria-label="more options">
<span className="icon">
<i className="fas fa-angle-down" aria-hidden="true"></i>
</span>
</a>
</header>
<div id={`collapsible-card-0`} className="is-collapsible" data-parent={`accordion_first2`}>
<div className="card-content">
<p className="is-small has-text-primary has-text-weight-semibold">Tag</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Wochentag" />
<p className="is-small has-text-primary has-text-weight-semibold">Uhrzeit von</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Uhrzeit von" />
<p className="is-small has-text-primary has-text-weight-semibold">Uhrzeit bis</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Uhrzeit bis" />
<article className="message mt-3">
<div className="message-body">
Uhrzeit von ist die Startzeit und Uhrzeit bis ist die Endzeit des Trainings. Gültiges Format hh:mm, z.B. 17:45.
</div>
</article>
</div>
</div>
</div>
<div className="card">
<header className="card-header">
<p className="card-header-title">
dasdasd
</p>
<a href={`#collapsible-card-1`} data-action="collapse" className="card-header-icon is-hidden-fullscreen" aria-label="more options">
<span className="icon">
<i className="fas fa-angle-down" aria-hidden="true"></i>
</span>
</a>
</header>
<div id={`collapsible-card-1`} className="is-collapsible" data-parent={`accordion_first2`}>
<div className="card-content">
<p className="is-small has-text-primary has-text-weight-semibold">Tag</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Wochentag" />
<p className="is-small has-text-primary has-text-weight-semibold">Uhrzeit von</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Uhrzeit von" />
<p className="is-small has-text-primary has-text-weight-semibold">Uhrzeit bis</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Uhrzeit bis" />
<article className="message mt-3">
<div className="message-body">
Uhrzeit von ist die Startzeit und Uhrzeit bis ist die Endzeit des Trainings. Gültiges Format hh:mm, z.B. 17:45.
</div>
</article>
</div>
</div>
</div>
</div>
Since I am having several elements I want to add to the dropdown, I am using a loop. But unfortunately, after adding the loop, the collapsibles aren't working properly - they are staying open and I cannot close them or interact with them.
So that's actually what I want:
<div ref={collapsiblesRef} id={`accordion_first`}>
{trainingData.map((d, i) => (
<div className="card" key={i}>
<header className="card-header">
<p className="card-header-title">
{d.tag}
</p>
<a href={`#collapsible-card-${i}`} data-action="collapse" className="card-header-icon is-hidden-fullscreen" aria-label="more options">
<span className="icon">
<i className="fas fa-angle-down" aria-hidden="true"></i>
</span>
</a>
</header>
<div id={`collapsible-card-${i}`} className="is-collapsible" data-parent={`accordion_first`}>
<div className="card-content">
<p className="is-small has-text-primary has-text-weight-semibold">Tag</p>
</div>*/}
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Wochentag" />
<p className="is-small has-text-primary has-text-weight-semibold">Uhrzeit von</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Uhrzeit von" />
<p className="is-small has-text-primary has-text-weight-semibold">Uhrzeit bis</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Uhrzeit bis" />
<article className="message mt-3">
<div className="message-body">
Uhrzeit von ist die Startzeit und Uhrzeit bis ist die Endzeit des Trainings. Gültiges Format hh:mm, z.B. 17:45.
</div>
</article>
</div>
</div>
</div>
))}
</div>
I played a bit with the code, this works for me.
import React from "react";
import bulmaCollapsible from '#creativebulma/bulma-collapsible';
import 'bulma';
import '#creativebulma/bulma-collapsible';
///I want to generate a random number of collapsibles.
const array = [0,1,2,3,4,5,6]
class Collapsibles extends React.Component {
componentDidMount() {
this.collapsibles = bulmaCollapsible.attach(".is-collapsible", {
container: this.refs.collapsibles
});
}
render() {
const collapsibles = array.map((c,i) => <article className="message">
<div className="message-header">
<p>
Question 1{" "}
<a href={"#collapsible-message-accordion-"+ i.toString()} data-action="collapse">
Collapse/Expand
</a>
</p>
</div>
<div
id={"collapsible-message-accordion-"+ i.toString()}
className="message-body is-collapsible is-active"
data-parent="accordion_first"
>
<div className="message-body-content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{" "}
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut,
porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla.
Nullam gravida purus diam, et dictum
<a>felis venenatis</a> efficitur. Aenean ac{" "}
<em>eleifend lacus</em>, in mollis lectus. Donec sodales, arcu et
sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi
magna a neque. Donec dui urna, vehicula et sem eget, facilisis
sodales sem.
</div>
</div>
</article>)
return (
<div ref="collapsibles" id="accordion_first">
{collapsibles}
</div>
)
}
}
export default Collapsibles
A few notes on the code:
First, I assume you're aware that bulmaCollapsible is an npm package that needs to be installed. You can find directions for installation here.
I didn't fully understand where you got your code from, I copied mine from the CodePen you provided. Each collapsible container is an article tag.
My code lacks any transition properties. So it won't slowly open and close. You'll have to add some minor css to make that happen.
The method attach is responsible to initialise any element with the className of is-collapsible. It was made so you can initialise multiple collapsibles at once.
In my code I created an array const called "array". Then I used the map method like you did to generate multiple collapsibles.
The following will give you 1 collapsible:
<article className="message">
<div className="message-header">
<p>
Question 1{" "}
<a href={"#collapsible-message-accordion-"+ i.toString()} data-action="collapse">
Collapse/Expand
</a>
</p>
</div>
<div
id={"collapsible-message-accordion-"+ i.toString()}
className="message-body is-collapsible is-active"
data-parent="accordion_first"
>
<div className="message-body-content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{" "}
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut,
porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla.
Nullam gravida purus diam, et dictum
<a>felis venenatis</a> efficitur. Aenean ac{" "}
<em>eleifend lacus</em>, in mollis lectus. Donec sodales, arcu et
sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi
magna a neque. Donec dui urna, vehicula et sem eget, facilisis
sodales sem.
</div>
</div>
Each collapsible needs to have a unique id. For each collapsible we use an a tag with an href attribute equal to the collapsible's id. This is reflected in the lines where you see href={"#collapsible-message-accordion-"+ i.toString()} and id={"#collapsible-message-accordion-"+ i.toString()}
To know more about how this package work, visit their JS API page.
I'm creating a Blazor Server project with login and I want to check if the email and password that the user introduces exists in the database(I'm using Sql Server). I created my method that is searching in the database in a class named BatranService and my login form in a Razor component, but I'm not sure how the code to connect these two would look like. I would appreciate any help, thanks!
public class BatranService : IBatranService
{
private readonly VoluntariatDBContext _context;
public BatranService(VoluntariatDBContext context)
{
_context = context;
}
public async Task<Batran> GetBatranByEmailAndParola(string email, string parola)
{
Batran batran = await _context.Batrans.Where(c=>c.Parola==parola).FirstOrDefaultAsync(c => c.Email == email);
return batran;
}
}
<EditForm Model="#batran" OnValidSubmit="#authBatran">
<div class="container px-4 py-5 mx-auto">
<div class="card card0">
<div class="d-flex flex-lg-row flex-column-reverse">
<div class="card card1">
<div class="row justify-content-center my-auto">
<div class="col-md-8 col-10 my-5">
<div class="row justify-content-center px-3 mb-3"> <img id="logo" src="css/autentificareLogo.png"> </div>
<h3 class="mb-5 text-center heading">Autentificare</h3>
<div class="form-group"> <label class="form-control-label text-muted">Email</label> <input type="text" id="email" #bind-value="#batran.Email" name="email" placeholder="Email" class="form-control"> </div>
<div class="form-group"> <label class="form-control-label text-muted">Parola</label> <input type="password" id="parola" #bind-value="#batran.Parola" name="parola" placeholder="Parola" class="form-control"> </div>
<div class="row justify-content-center my-3 px-3"> <button #onclick="authBatran" class="btn-block btn-color">Intra in cont</button> </div>
<div class="row justify-content-center my-2"> <small class="text-muted">Ai uitat parola?</small> </div>
</div>
</div>
<div class="bottom text-center mb-5">
<p href="#" class="sm-text mx-auto mb-3">Nu ai un cont?<button #onclick="deschideInregistrare" class="btn btn-white ml-2">Inregistreaza-te acum!</button></p>
</div>
<div class="col-12 row" style="text-align:left; font-weight:bold">
<span class="col-12"></span>
</div>
</div>
<div class="card card2">
<div class="my-auto mx-md-5 px-md-5 right">
<h4 class="text-white">We are more than just a company</h4> <small class="text-white">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</small>
</div>
</div>
</div>
</div>
</div>
</EditForm>
#code{
private void authBatran()
{
}
}
I dont know what's wrong with my code and I dont see any errors in console. My div panels are not working properly. I am having ng-click and when I click I am showing a div. Also arrow symbol on top right corner does not work.
Is there anything I am missing
Html
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title"> <a data-toggle="collapse" style="cursor:pointer" ng-click="ShowDefinition()" aria-expanded="true" aria-controls="collapseOne">Definition</a> </h4>
</div>
<div id="collapseOne" ng-show="IsDefinitionVisible" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. </div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingTwo">
<h4 class="panel-title"> <a class="collapsed" data-toggle="collapse" style="cursor:pointer" ng-click="ShowValues()" aria-expanded="false" aria-controls="collapseTwo"> What We Do? </a> </h4>
</div>
<div id="collapseTwo" ng-show="IsValuesVisible" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
<div class="panel-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. </div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingThree">
<h4 class="panel-title"> <a class="collapsed" data-toggle="collapse" style="cursor:pointer" ng-click="ShowPrinciples()" aria-expanded="false" aria-controls="collapseThree"> Where We Do It? </a> </h4>
</div>
<div id="collapseThree" ng-show="IsPrinciplesVisible" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
<div class="panel-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. </div>
</div>
</div>
</div>
Angular Controller
(function () {
var app = angular.module('myApp');
app.controller('aboutController', ['$scope',
function ($scope) {
$scope.TestAbout = "Test";
$scope.ShowDefinition = function () {
//If DIV is visible it will be hidden and vice versa.
$scope.IsDefinitionVisible = $scope.IsDefinitionVisible ? false : true;
}
$scope.ShowValues = function () {
//If DIV is visible it will be hidden and vice versa.
$scope.IsValuesVisible = $scope.IsValuesVisible ? false : true;
}
$scope.ShowPrinciples = function () {
//If DIV is visible it will be hidden and vice versa.
$scope.IsPrinciplesVisible = $scope.IsPrinciplesVisible ? false : true;
}
console.log($scope.TestAbout);
}
]);
})();
Here you go, working code:
Html:
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne"><i ng-if="!IsDefinitionVisible" style="float:right" class="glyphicon glyphicon-arrow-down"></i><i ng-if="IsDefinitionVisible" style="float:right" class="glyphicon glyphicon-arrow-up"></i>
<h4 class="panel-title"> <a data-toggle="collapse" style="cursor:pointer" ng-click="ShowDefinition()" aria-expanded="true" aria-controls="collapseOne">Definition</a> </h4>
</div>
<div id="collapseOne" ng-show="IsDefinitionVisible" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. </div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingTwo"><i ng-if="!IsValuesVisible" style="float:right" class="glyphicon glyphicon-arrow-down"></i><i ng-if="IsValuesVisible" style="float:right" class="glyphicon glyphicon-arrow-up"></i>
<h4 class="panel-title"> <a data-toggle="collapse" style="cursor:pointer" ng-click="ShowValues()" aria-expanded="true" aria-controls="collapseTwo">What We Do?</a> </h4>
</div>
<div id="collapseTwo" ng-show="IsValuesVisible" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo">
<div class="panel-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. </div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingThree"><i ng-if="!IsPrinciplesVisible" style="float:right" class="glyphicon glyphicon-arrow-down"></i><i ng-if="IsPrinciplesVisible" style="float:right" class="glyphicon glyphicon-arrow-up"></i>
<h4 class="panel-title"> <a data-toggle="collapse" style="cursor:pointer" ng-click="ShowPrinciples()" aria-expanded="true" aria-controls="collapseThree">Where We Do It?</a> </h4>
</div>
<div id="collapseThree" ng-show="IsPrinciplesVisible" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingThree">
<div class="panel-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. </div>
</div>
</div>
</div>
Plunker : http://plnkr.co/edit/CsMKy6ctHAgXg9O4gkob?p=preview
I also added bootstrap arrows.
I am implementing 3 different modals in the same view,
but only the one that's placed last could be activated.. my code:
<div ui-content-for="modals">
<div class="modal" ui-if="blockPersonModal" ui-state='blockPersonModal'>
<div class="modal-backdrop in"></div>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button class="close"
ui-turn-off="blockPersonModal">×</button>
<h4 class="modal-title">Block</h4>
</div>
<div class="modal-body">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio quo illum nihil voluptatem earum optio repellendus, molestias illo facere, ea non. Possimus assumenda illo accusamus voluptatibus, vel corporis maxime quam.</p>
</div>
<div class="modal-footer">
<button ui-turn-off="blockPersonModal" class="btn btn-default">Close</button>
<button ui-turn-off="blockPersonModal" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
</div>
<div ui-content-for="modals">
<div class="modal" ui-if="RequestIdentificationModal" ui-state='RequestIdentificationModal'>
<div class="modal-backdrop in"></div>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button class="close"
ui-turn-off="RequestIdentificationModal">×</button>
<h4 class="modal-title">Request Identification</h4>
</div>
<div class="modal-body">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio quo illum nihil voluptatem earum optio repellendus, molestias illo facere, ea non. Possimus assumenda illo accusamus voluptatibus, vel corporis maxime quam.</p>
</div>
<div class="modal-footer">
<button ui-turn-off="RequestIdentificationModal" class="btn btn-default">Close</button>
<button ui-turn-off="RequestIdentificationModal" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
</div>
<div ui-content-for="modals">
<div class="modal" ui-if="ReportModal" ui-state='ReportModal'>
<div class="modal-backdrop in"></div>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button class="close"
ui-turn-off="ReportModal">×</button>
<h4 class="modal-title">Report</h4>
</div>
<div class="modal-body">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio quo illum nihil voluptatem earum optio repellendus, molestias illo facere, ea non. Possimus assumenda illo accusamus voluptatibus, vel corporis maxime quam.</p>
</div>
<div class="modal-footer">
<button ui-turn-off="ReportModal" class="btn btn-default">Close</button>
<button ui-turn-off="ReportModal" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
</div>
if I am changing the order of the modals in my code, still only the last one will show up.
how can I define three different modals in the new angularjs mobile ui?
unfourtanatley, the docs lacks clear information about how to do such a thing.
thanks,
Yonatan.
Found the problem.
The correct way to write multiple modals:
<div ui-content-for="modals">
<div class="modal">....</div>
<div class="modal">....</div>
<div class="modal">....</div>
</div>
Instead of:
<div ui-content-for="modals">
<div class="modal">....</div>
</div>
<div ui-content-for="modals">
<div class="modal">....</div>
</div>
<div ui-content-for="modals">
<div class="modal">....</div>
</div>