Simple AngularJS app with service does not work

I've got a very simple angular app that I can not figure out what is wrong with. The code is on plunkr here: and generates the error: Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to: Error: [$injector:unpr] Unknown provider: testService

The code is below

<!doctype html>
<html lang="en">
    <meta charset="UTF-8">
    <title>simple problem I can not figure out</title>

    <script src="//"></script>

    <script type="text/javascript">

        (function() {
            'use strict';

            var myAppModule = angular.module('myApp', []);

            myAppModule.service('testService', function (testService) {

                function (testService) {



    <body >
    <div ng-app="myApp">
           myApp Here

1 Answer

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>