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>
angularjs routing
add a comment |
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>
angularjs routing
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
add a comment |
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>
angularjs routing
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
angularjs routing
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
add a comment |
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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