javascript - angularJS href route conflict -
Hello there is a normal navigation bar for all of my MVC pages. It is a MVC 4.0 app.
This is a model of breadcrumbs:
& lt; Div id = "nav" & gt; & Lt; Ul class = "brdcm" & gt; @ {Sample.models.bredcambes collectionCLN = vubag.breadcrumbs; If (I == 0) {& lt; Li class = "last" & gt; & Lt; A href = '@ CLN [i] .url' & gt; @cln [i] .text & lt; / A & gt; & Lt; / Li & gt; } Other {& lt; Li & gt; & Lt; A href = '@ cln [i]. URL '& gt; @cln [i]. Text & lt; / A & gt; & Lt; / Li & gt; }} & Lt; Li class = "before" & gt; & Lt; Img src ='@cln.IconUrl '/ & gt; & Lt; / Li & gt; }} & Lt; / Ul & gt; & Lt; / Div & gt;
The breadcrumb made in the view file is as follows:
@using Sample.Models. Quotes; @ {ViewBag.Title = "Creation quote"; Layout = "~ / scene / share / _Layout.cshtml"; Sample.models.breadcomscallioncln = new sample.models.breadcomsculsions (); Cln.Add (new sample.models.breadcrumb () (text = "construction quote", url = "/ quotation /"}); //cln.Add (new sample.models.breadcrumb () {text = "creation quote ", Url =" / quote / "+ q.QuoteId.ToString ()}); Cln.Add (new sample.models.breadcrumb () {text =" quotation ", url =" / quotation "}); Cln. Add (New sample.models.breadcrumbs () (text = "home", url = "/"}); Cln.IconUrl = "/Images/msg_icon.png"; ViewBag.BreadCrumbs = cln;}
< / Pre>The cs.app.js file looks like this:
var app module = angular. Dual ('Sample' app, ['NGRsource', 'NG root', 'NGSNITIES', 'NGQQs', 'UIUTHIL']); AppModule.config (function ($ route provider, $ location provider) {$ routeProvider.when ('/ QuoteId / quoteId', {controller: construction quote =}}; $ locationProvider.html5Mode (true);});
I have the issue that app pages work There are all href links inside but have to be added to ng-click and $ as scope in script
Href witten like this work:
& lt; A href = "" ng-click = "gotoSummary ()" & gt; Summary & lt; / A & gt;
but it does not work:
cln.Add (new sample.models.breadcrumb () {text = "home", url = " / "});
What does this mean that all my main NAV and footer links do not work because they are created with normal ARR =
I use NG Can I change the model for When Div calls for the controller and still works for all other common href links, click
Thanks for all your help
for angle in #links (please see here)
& lt; A href = "# / products /" & gt; Angular product link & lt; / A & gt;
Use the normal links for 'non-bronze'
& lt; A href = "/ products /" & gt; Non Bronze Product Link & lt; / A & gt;
Comments
Post a Comment