1

I have a trouble with starting an example in JSFiddle, it's simple code with AngularJS module, but I get a error with injecting module.

Javascript code:

angular
  .module('App', ['ngMaterial'])
  .controller('Ctrl', function($scope) {
    $scope.text = 'Hello';
  });

Html code:

<div ng-app="App" ng-controller="Ctrl">
  {{ text }}
</div>

Please, help me to fix it. Link to my JSFiddle

1

1 Answer 1

2

You need to change you javascript Load Type configuration. For example:

No wrap - in <body> or <head>

enter image description here

Updated JSFiddle

Sign up to request clarification or add additional context in comments.

2 Comments

You don't need to set the framework there, he has it imported in the external resources this would create a warning stating you're trying to load multiple instances of angularjs.
@GiovaniVercauteren, Did not see it. My bad. Thank you. Updated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.