angular routing, there's an error “injector:modulerr”, can't find my ng-app











up vote
0
down vote

favorite












I'm new to angular js...I just want to load the html file when clicking on the link it's pertaining to. But it's throwing an error saying It can't find my ng-app directive. I edited the templateUrl objects to load some cat photos...but still no go.



[$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.





var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$routeProvider
.when("/skills", {
templateUrl : "https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Fkittentoob.com%2Fwp-content%2Fuploads%2F2018%2F01%2FA-fluffy-cat-looking-funny-surprised-or-concerned.jpg&f=1"
})
.when("/interactives", {
templateUrl : "https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Ftse4.mm.bing.net%2Fth%3Fid%3DOIP.PRniL4_JLNvVMzdVgiDiYgHaEK%26pid%3D15.1&f=1"
});
});

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.js"></script>     
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-route.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-resource.js"></script>
<body ng-app="myApp">
<div class="row">
<div class="float-left p-5">
<nav>
<a class="mr-3 menu2" href="#!skills">Skill Set</a>
<a class="mr-3 menu3" href="#!interactives">Interactives</a>
</nav>
</div>
</div>

<div class="h-75">
<div class="middle">
<div ng-view>
<!-- body -->
</div>
</div>
</div>
<script src="script.js"></script>
</body>












share|improve this question
























  • Where exactly are you loading the script you shared in the HTML you shared? The HTML you shared doesn't have any <script> loading the AngularJS code you shared in your question.
    – Alexander Staroselsky
    Nov 5 at 3:33












  • I took it out for the purpose of the snippet. Went ahead and added it back...
    – Nick0989
    Nov 5 at 3:40

















up vote
0
down vote

favorite












I'm new to angular js...I just want to load the html file when clicking on the link it's pertaining to. But it's throwing an error saying It can't find my ng-app directive. I edited the templateUrl objects to load some cat photos...but still no go.



[$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.





var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$routeProvider
.when("/skills", {
templateUrl : "https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Fkittentoob.com%2Fwp-content%2Fuploads%2F2018%2F01%2FA-fluffy-cat-looking-funny-surprised-or-concerned.jpg&f=1"
})
.when("/interactives", {
templateUrl : "https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Ftse4.mm.bing.net%2Fth%3Fid%3DOIP.PRniL4_JLNvVMzdVgiDiYgHaEK%26pid%3D15.1&f=1"
});
});

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.js"></script>     
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-route.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-resource.js"></script>
<body ng-app="myApp">
<div class="row">
<div class="float-left p-5">
<nav>
<a class="mr-3 menu2" href="#!skills">Skill Set</a>
<a class="mr-3 menu3" href="#!interactives">Interactives</a>
</nav>
</div>
</div>

<div class="h-75">
<div class="middle">
<div ng-view>
<!-- body -->
</div>
</div>
</div>
<script src="script.js"></script>
</body>












share|improve this question
























  • Where exactly are you loading the script you shared in the HTML you shared? The HTML you shared doesn't have any <script> loading the AngularJS code you shared in your question.
    – Alexander Staroselsky
    Nov 5 at 3:33












  • I took it out for the purpose of the snippet. Went ahead and added it back...
    – Nick0989
    Nov 5 at 3:40















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm new to angular js...I just want to load the html file when clicking on the link it's pertaining to. But it's throwing an error saying It can't find my ng-app directive. I edited the templateUrl objects to load some cat photos...but still no go.



[$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.





var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$routeProvider
.when("/skills", {
templateUrl : "https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Fkittentoob.com%2Fwp-content%2Fuploads%2F2018%2F01%2FA-fluffy-cat-looking-funny-surprised-or-concerned.jpg&f=1"
})
.when("/interactives", {
templateUrl : "https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Ftse4.mm.bing.net%2Fth%3Fid%3DOIP.PRniL4_JLNvVMzdVgiDiYgHaEK%26pid%3D15.1&f=1"
});
});

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.js"></script>     
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-route.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-resource.js"></script>
<body ng-app="myApp">
<div class="row">
<div class="float-left p-5">
<nav>
<a class="mr-3 menu2" href="#!skills">Skill Set</a>
<a class="mr-3 menu3" href="#!interactives">Interactives</a>
</nav>
</div>
</div>

<div class="h-75">
<div class="middle">
<div ng-view>
<!-- body -->
</div>
</div>
</div>
<script src="script.js"></script>
</body>












share|improve this question















I'm new to angular js...I just want to load the html file when clicking on the link it's pertaining to. But it's throwing an error saying It can't find my ng-app directive. I edited the templateUrl objects to load some cat photos...but still no go.



[$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.





var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$routeProvider
.when("/skills", {
templateUrl : "https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Fkittentoob.com%2Fwp-content%2Fuploads%2F2018%2F01%2FA-fluffy-cat-looking-funny-surprised-or-concerned.jpg&f=1"
})
.when("/interactives", {
templateUrl : "https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Ftse4.mm.bing.net%2Fth%3Fid%3DOIP.PRniL4_JLNvVMzdVgiDiYgHaEK%26pid%3D15.1&f=1"
});
});

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.js"></script>     
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-route.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-resource.js"></script>
<body ng-app="myApp">
<div class="row">
<div class="float-left p-5">
<nav>
<a class="mr-3 menu2" href="#!skills">Skill Set</a>
<a class="mr-3 menu3" href="#!interactives">Interactives</a>
</nav>
</div>
</div>

<div class="h-75">
<div class="middle">
<div ng-view>
<!-- body -->
</div>
</div>
</div>
<script src="script.js"></script>
</body>








var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$routeProvider
.when("/skills", {
templateUrl : "https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Fkittentoob.com%2Fwp-content%2Fuploads%2F2018%2F01%2FA-fluffy-cat-looking-funny-surprised-or-concerned.jpg&f=1"
})
.when("/interactives", {
templateUrl : "https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Ftse4.mm.bing.net%2Fth%3Fid%3DOIP.PRniL4_JLNvVMzdVgiDiYgHaEK%26pid%3D15.1&f=1"
});
});

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.js"></script>     
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-route.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-resource.js"></script>
<body ng-app="myApp">
<div class="row">
<div class="float-left p-5">
<nav>
<a class="mr-3 menu2" href="#!skills">Skill Set</a>
<a class="mr-3 menu3" href="#!interactives">Interactives</a>
</nav>
</div>
</div>

<div class="h-75">
<div class="middle">
<div ng-view>
<!-- body -->
</div>
</div>
</div>
<script src="script.js"></script>
</body>





var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$routeProvider
.when("/skills", {
templateUrl : "https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Fkittentoob.com%2Fwp-content%2Fuploads%2F2018%2F01%2FA-fluffy-cat-looking-funny-surprised-or-concerned.jpg&f=1"
})
.when("/interactives", {
templateUrl : "https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Ftse4.mm.bing.net%2Fth%3Fid%3DOIP.PRniL4_JLNvVMzdVgiDiYgHaEK%26pid%3D15.1&f=1"
});
});

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.js"></script>     
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-route.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-resource.js"></script>
<body ng-app="myApp">
<div class="row">
<div class="float-left p-5">
<nav>
<a class="mr-3 menu2" href="#!skills">Skill Set</a>
<a class="mr-3 menu3" href="#!interactives">Interactives</a>
</nav>
</div>
</div>

<div class="h-75">
<div class="middle">
<div ng-view>
<!-- body -->
</div>
</div>
</div>
<script src="script.js"></script>
</body>






angularjs routing






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 5 at 3:41

























asked Nov 5 at 3:26









Nick0989

1639




1639












  • Where exactly are you loading the script you shared in the HTML you shared? The HTML you shared doesn't have any <script> loading the AngularJS code you shared in your question.
    – Alexander Staroselsky
    Nov 5 at 3:33












  • I took it out for the purpose of the snippet. Went ahead and added it back...
    – Nick0989
    Nov 5 at 3:40




















  • Where exactly are you loading the script you shared in the HTML you shared? The HTML you shared doesn't have any <script> loading the AngularJS code you shared in your question.
    – Alexander Staroselsky
    Nov 5 at 3:33












  • I took it out for the purpose of the snippet. Went ahead and added it back...
    – Nick0989
    Nov 5 at 3:40


















Where exactly are you loading the script you shared in the HTML you shared? The HTML you shared doesn't have any <script> loading the AngularJS code you shared in your question.
– Alexander Staroselsky
Nov 5 at 3:33






Where exactly are you loading the script you shared in the HTML you shared? The HTML you shared doesn't have any <script> loading the AngularJS code you shared in your question.
– Alexander Staroselsky
Nov 5 at 3:33














I took it out for the purpose of the snippet. Went ahead and added it back...
– Nick0989
Nov 5 at 3:40






I took it out for the purpose of the snippet. Went ahead and added it back...
– Nick0989
Nov 5 at 3:40



















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53147915%2fangular-routing-theres-an-error-injectormodulerr-cant-find-my-ng-app%23new-answer', 'question_page');
}
);

Post as a guest





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53147915%2fangular-routing-theres-an-error-injectormodulerr-cant-find-my-ng-app%23new-answer', 'question_page');
}
);

Post as a guest




















































































這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini