This function is not registered in the lock list

Asked 2 years ago, Updated 2 years ago, 80 views

I just modified the monaca template file a little bit and got an error.
I am in trouble because I cannot identify the cause.
You can ignore the error itself, but others seem to work, so you can ignore it.
If possible, I will try not to display errors.

Could you give me some tips on how to solve this problem?

Steps to Run
1. Create project from "Onsen UI Minimal Template" on cloud
2. Import into LocalKit
3. Modified index.html slightly
4. When previewing with LocalKit, an error is displayed on the Developer tool screen.

■ Error log

Error: This function is not registered in the lock list.
    at Object.DoorLock._unlock(loader.js:1450)
    at unlock (loader.js:1450)
    at Scope.$broadcast (loader.js:1444)
    at link.post (loader.js:1454)
    at invokeLinkFn (loader.js:1442)
    at nodeLinkFn (loader.js:1441)
    at compositeLinkFn (loader.js:1441)
    at compositeLinkFn (loader.js:1441)
    at compositeLinkFn (loader.js:1441)
    at loader.js —1441

■ index.html

<!DOCTYPE HTML>
<html>
<head>
    <metacharset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scale=no">
    <script src="components/loader.js"></script>
    <link rel="stylesheet" href="components/loader.css">
    <link rel="stylesheet" href="css/style.css">
    <script>
        ons.bootstrap();
        varmodule=angular.module('myApp', ['onsen']); // ← Add this line
    </script>
</head>
<!--<body> Before Modification-->
<bodyg-app="myApp">>!--←Correct this line-->
    <ons-navigator var="myNavigator" page="page1.html">
    </ons-navigator> 
</body>
</html>

monaca angularjs

2022-09-30 17:05

1 Answers

ons.bootstrap();
varmodule=angular.module('myApp', ['onsen']);

I think these two lines are competing.
angular.module('myApp', ['onsen'])

if you are using OnsenUI as the method in the . ons.bootstrap();
I think you can delete the .


2022-09-30 17:05

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.