Plunker Code Showing Issue Described Belowकोणीय यूआई-रूटर टेम्पलेट है कि मैं
http://plnkr.co/edit/Bz3Qhf1eDuFrnKI0qnUo?p=preview
के लिए मैं AngularUI सुइट, यूआई-रूटर और यूआई-बूटस्ट्रैप के दो घटक उपयोग कर रहा हूँ नहीं पूछा लोड करने के लिए विफल रहता है। यूआई-राउटर टेम्पलेट लोड करने के लिए ज़िम्मेदार है जब उपयोगकर्ता मेरे शीर्ष नौसेना लिंक पर क्लिक करता है।
केवल 'यूआई विजेट टेम्पलेट' (AngularUI-बूटस्ट्रैप और चेतावनी) के तहत पहले दो लिंक सक्रिय
यूआई-बूटस्ट्रैप टेम्पलेट्स के भीतर अच्छा विगेट्स बनाने के लिए जिम्मेदार है कर रहे हैं। मुझे लगता है कि यूआई-राउटर ठीक से कॉन्फ़िगर किया गया है कि मैं उचित टेम्पलेट लोड कर रहा हूं और उन टेम्पलेट्स के पास सही नियंत्रक तक पहुंच है। मेरी समस्या यह है कि मेरा यूआई-बूटस्ट्रैप घटक लोड करने और अजीब त्रुटियों को उत्पन्न करने में विफल रहे हैं जो इंगित करते हैं कि वे किसी भी तरह टेम्पलेट लोड करने का प्रयास कर रहे हैं ??? बूटस्ट्रैप-यूआई निर्देशों को लोड होने से मुझे अपने कार्यान्वयन में क्या गड़बड़ है?
चेतावनी लटकती कड़ी के लिए एचटीएमएल खाका कंसोल से
<tabset>
<tab heading="Static title">Static content</tab>
<tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" disabled="tab.disabled">
{{tab.content}}
</tab>
<tab select="alertMe()">
<tab-heading>
<i class="icon-bell"></i> Select me for alert!
</tab-heading>
I've got an HTML heading, and a select callback. Pretty cool!
</tab>
</tabset>
{{tabs}}
त्रुटि संदेश जब चेतावनी टेम्पलेट लोड
कोणीय अच्छाई
angular.module("uiRouterExample", [
'ui.router',
'ui.bootstrap']).config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('home', {
url: '/home',
templateUrl: 'templates/home.html',
controller: 'BSCtrl'
})
.state('angularBS', {
url: '/angularBS',
templateUrl: 'templates/angularBS.html',
controller: 'BSCtrl'
})
.state('alert', {
url: '/alert',
templateUrl: 'templates/alert.html',
controller: 'BSCtrl'
})
;
})
.controller('BSCtrl', function ($scope) {
$scope.tabs = [
{ title:"Accordion", content:"Dynamic content 1" },
{ title:"Alert", content:"Dynamic content 2"},
{title:"Buttons", content:"More Dynamic Content"}
];
$scope.test="Hello World";
$scope.alerts = [
{ type: 'error', msg: 'Oh snap! Change a few things up and try submitting again.' },
{ type: 'success', msg: 'Well done! You successfully read this important alert message.' }
];
$scope.addAlert = function() {
$scope.alerts.push({msg: "Another alert!"});
};
$scope.closeAlert = function(index) {
$scope.alerts.splice(index, 1);
};
});
आप बहुत सही हैं! आपका बहुत बहुत धन्यवाद। – mccainz
कृपया @inolasco जवाब जोड़ें! – Roberto