本文翻译自:angular.service vs angular.factory

I have seen both angular.factory() and angular.service() used to declare services; 我见过用于声明服务的angular.factory()和angular.service() ; however, I cannot find angular.service anywhere in official documentation. 但是,我在官方文档中找不到 angular.service

What is the difference between the two methods? 这两种方法有什么区别? Which should be used for what (assuming they do different things)? 应该用什么(假设他们做不同的事情)?


#1楼

参考:https://stackoom.com/question/y6RX/angular-service-vs-angular-factory


#2楼

Here are the primary differences: 以下是主要差异:

Services 服务

Syntax: module.service( 'serviceName', function ); 语法: module.service( 'serviceName', function );

Result: When declaring serviceName as an injectable argument you will be provided with the instance of a function passed to module.service . 结果:将serviceName声明为injectable参数时,将向您提供传递给module.service 的函数实例

Usage: Could be useful for sharing utility functions that are useful to invoke by simply appending ( ) to the injected function reference. 用法:通过简单地向注入的函数引用附加( )共享对调用有用的实用程序函数非常有用。 Could also be run with injectedArg.call( this ) or similar. 也可以使用injectedArg.call( this )或类似的方式运行。

Factories 工厂

Syntax: module.factory( 'factoryName', function ); 语法: module.factory( 'factoryName', function );

Result: When declaring factoryName as an injectable argument you will be provided with the value that is returned by invoking the function reference passed to module.factory . 结果:当将factoryName声明为injectable参数时,将通过调用传递给module.factory 的函数引用来提供返回

Usage: Could be useful for returning a 'class' function that can then be new'ed to create instances. 用法:用于返回一个'class'函数,然后可以用来创建实例。

Here is example using services and factory . 这是使用服务和工厂的示例 。 Read more about AngularJS Service vs Factory . 阅读更多关于AngularJS Service vs Factory的信息 。

You can also check the AngularJS documentation and similar question on stackoverflow confused about service vs factory . 您还可以检查AngularJS文档以及有关服务与工厂混淆的 stackoverflow上的类似问题。


#3楼

Simply put .. 简单的说 ..

// Service
service = (a, b) => {a.lastName = b;return a;
};// Factory
factory = (a, b) => Object.assign({}, a, { lastName: b });

 const fullName = { firstName: 'john' }; // Service const lastNameService = (a, b) => { a.lastName = b; return a; }; console.log(lastNameService(fullName, 'doe')); // Factory const lastNameFactory = (a, b) => Object.assign({}, a, { lastName: b }) console.log(lastNameFactory(fullName, 'doe')); 


#4楼

  angular.service('myService', myServiceFunction);angular.factory('myFactory', myFactoryFunction);

I had trouble wrapping my head around this concept until I put it to myself this way: 我无法绕过这个概念,直到我这样说:

Service : the function that you write will be new -ed: 服务 :你编写的函数将是新的

  myInjectedService  <----  new myServiceFunction()

Factory : the function (constructor) that you write will be invoked : Factory :将调用您编写的函数 (构造函数):

  myInjectedFactory  <---  myFactoryFunction()

What you do with that is up to you, but there are some useful patterns... 你用它做什么取决于你,但有一些有用的模式......

Such as writing a service function to expose a public API: 比如编写一个服务函数来公开一个公共API:

function myServiceFunction() {this.awesomeApi = function(optional) {// calculate some stuffreturn awesomeListOfValues;}
}
---------------------------------------------------------------------------------
// Injected in your controller
$scope.awesome = myInjectedService.awesomeApi();

Or using a factory function to expose a public API: 或使用工厂函数公开公共API:

function myFactoryFunction() {var aPrivateVariable = "yay";function hello() {return "hello mars " + aPrivateVariable;}// expose a public APIreturn {hello: hello};
}
---------------------------------------------------------------------------------
// Injected in your controller
$scope.hello = myInjectedFactory.hello();

Or using a factory function to return a constructor: 或使用工厂函数返回构造函数:

function myFactoryFunction() {return function() {var a = 2;this.a2 = function() {return a*2;};};
}
---------------------------------------------------------------------------------
// Injected in your controller
var myShinyNewObject = new myInjectedFactory();
$scope.four = myShinyNewObject.a2();

Which one to use?... 哪一个使用?...

You can accomplish the same thing with both. 你可以用两者完成同样的事情。 However, in some cases the factory gives you a little bit more flexibility to create an injectable with a simpler syntax. 但是,在某些情况下, 工厂可以更灵活地创建具有更简单语法的注入。 That's because while myInjectedService must always be an object, myInjectedFactory can be an object, a function reference, or any value at all. 这是因为myInjectedService必须始终是一个对象,myInjectedFactory可以是一个对象,一个函数引用或任何值。 For example, if you wrote a service to create a constructor (as in the last example above), it would have to be instantiated like so: 例如,如果您编写了一个服务来创建构造函数(如上面的上一个示例所示),则必须实例化它:

var myShinyNewObject = new myInjectedService.myFunction()

which is arguably less desirable than this: 这可能比这更不可取:

var myShinyNewObject = new myInjectedFactory();

(But you should be wary about using this type of pattern in the first place because new -ing objects in your controllers creates hard-to-track dependencies that are difficult to mock for testing. Better to have a service manage a collection of objects for you than use new() wily-nilly.) (但是你应该首先考虑使用这种类型的模式,因为你的控制器中的对象会创建难以模拟测试的难以跟踪的依赖关系。最好让服务管理一组对象你比使用new()狡猾的。)


One more thing, they are all Singletons... 还有一件事,他们都是单身人士......

Also keep in mind that in both cases, angular is helping you manage a singleton. 还要记住,在这两种情况下,angular都可以帮助您管理单身人士。 Regardless of where or how many times you inject your service or function, you will get the same reference to the same object or function. 无论您注入服务或功能的位置或次数,您都将获得对同一对象或功能的相同引用。 (With the exception of when a factory simply returns a value like a number or string. In that case, you will always get the same value, but not a reference.) (除了工厂只返回一个数字或字符串之类的值。在这种情况下,您将始终获得相同的值,但不是引用。)


#5楼

TL;DR TL; DR

1) When you're using a Factory you create an object, add properties to it, then return that same object. 1)当您使用工厂时,您创建一个对象,向其添加属性,然后返回该对象。 When you pass this factory into your controller, those properties on the object will now be available in that controller through your factory. 当您将此工厂传递到控制器时,该对象上的这些属性现在将通过您的工厂在该控制器中可用。

app.controller('myFactoryCtrl', function($scope, myFactory){$scope.artist = myFactory.getArtist();
});app.factory('myFactory', function(){var _artist = 'Shakira';var service = {};service.getArtist = function(){return _artist;}return service;
});


2) When you're using Service , Angular instantiates it behind the scenes with the 'new' keyword. 2)当您使用Service时 ,Angular使用'new'关键字在幕后实例化它。 Because of that, you'll add properties to 'this' and the service will return 'this'. 因此,您将向'this'添加属性,服务将返回'this'。 When you pass the service into your controller, those properties on 'this' will now be available on that controller through your service. 当您将服务传递到控制器时,“this”上的这些属性现在将通过您的服务在该控制器上可用。

app.controller('myServiceCtrl', function($scope, myService){$scope.artist = myService.getArtist();
});app.service('myService', function(){var _artist = 'Nelly';this.getArtist = function(){return _artist;}
});



Non TL;DR 非TL; DR

1) Factory 1)工厂
Factories are the most popular way to create and configure a service. 工厂是最流行的创建和配置服务的方式。 There's really not much more than what the TL;DR said. DR说的确没有比TL更多的东西。 You just create an object, add properties to it, then return that same object. 您只需创建一个对象,向其添加属性,然后返回该对象。 Then when you pass the factory into your controller, those properties on the object will now be available in that controller through your factory. 然后,当您将工厂传递到控制器时,该对象上的这些属性现在将通过您的工厂在该控制器中可用。 A more extensive example is below. 下面是一个更广泛的例子。

app.factory('myFactory', function(){var service = {};return service;
});

Now whatever properties we attach to 'service' will be available to us when we pass 'myFactory' into our controller. 现在,当我们将'myFactory'传递给我们的控制器时,我们可以使用我们附加到'service'的任何属性。

Now let's add some 'private' variables to our callback function. 现在让我们在回调函数中添加一些“私有”变量。 These won't be directly accessible from the controller, but we will eventually set up some getter/setter methods on 'service' to be able to alter these 'private' variables when needed. 这些不能直接从控制器访问,但我们最终会在'service'上设置一些getter / setter方法,以便在需要时能够改变这些'private'变量。

app.factory('myFactory', function($http, $q){var service = {};var baseUrl = 'https://itunes.apple.com/search?term=';var _artist = '';var _finalUrl = '';var makeUrl = function(){_artist = _artist.split(' ').join('+');_finalUrl = baseUrl + _artist + '&callback=JSON_CALLBACK';return _finalUrl}return service;
});

Here you'll notice we're not attaching those variables/function to 'service'. 在这里你会注意到我们没有将这些变量/函数附加到'service'。 We're simply creating them in order to either use or modify them later. 我们只是创建它们以便以后使用或修改它们。

  • baseUrl is the base URL that the iTunes API requires baseUrl是iTunes API所需的基本URL
  • _artist is the artist we wish to lookup _artist是我们希望查找的艺术家
  • _finalUrl is the final and fully built URL to which we'll make the call to iTunes makeUrl is a function that will create and return our iTunes friendly URL. _finalUrl是最终完全构建的URL,我们将调用iTunes makeUrl是一个函数,它将创建并返回我们的iTunes友好URL。

Now that our helper/private variables and function are in place, let's add some properties to the 'service' object. 现在我们的助手/私有变量和函数已经到位,让我们为'service'对象添加一些属性。 Whatever we put on 'service' we'll be able to directly use in whichever controller we pass 'myFactory' into. 无论我们提供什么“服务”,我们都可以直接使用我们通过“myFactory”的控制器。

We are going to create setArtist and getArtist methods that simply return or set the artist. 我们将创建setArtist和getArtist方法,只返回或设置艺术家。 We are also going to create a method that will call the iTunes API with our created URL. 我们还将创建一个方法,使用我们创建的URL调用iTunes API。 This method is going to return a promise that will fulfill once the data has come back from the iTunes API. 一旦数据从iTunes API返回,此方法将返回一个承诺。 If you haven't had much experience using promises in Angular, I highly recommend doing a deep dive on them. 如果你在Angular中没有使用promises的经验,我强烈建议你深入研究它们。

Below setArtist accepts an artist and allows you to set the artist. 以下setArtist接受艺术家并允许您设置艺术家。 getArtist returns the artist callItunes first calls makeUrl() in order to build the URL we'll use with our $http request. getArtist返回艺术家callItunes首先调用makeUrl()以构建我们将用$ http请求使用的URL。 Then it sets up a promise object, makes an $http request with our final url, then because $http returns a promise, we are able to call .success or .error after our request. 然后它设置一个promise对象,使用我们的最终url发出$ http请求,然后因为$ http返回一个promise,我们可以在我们的请求之后调用.success或.error。 We then resolve our promise with the iTunes data, or we reject it with a message saying 'There was an error'. 然后我们使用iTunes数据解决我们的承诺,或者我们拒绝它并显示“有错误”的消息。

app.factory('myFactory', function($http, $q){var service = {};var baseUrl = 'https://itunes.apple.com/search?term=';var _artist = '';var _finalUrl = '';var makeUrl = function(){_artist = _artist.split(' ').join('+');_finalUrl = baseUrl + _artist + '&callback=JSON_CALLBACK'return _finalUrl;}service.setArtist = function(artist){_artist = artist;}service.getArtist = function(){return _artist;}service.callItunes = function(){makeUrl();var deferred = $q.defer();$http({method: 'JSONP',url: _finalUrl}).success(function(data){deferred.resolve(data);}).error(function(){deferred.reject('There was an error')})return deferred.promise;}return service;
});

Now our factory is complete. 现在我们的工厂已经完工。 We are now able to inject 'myFactory' into any controller and we'll then be able to call our methods that we attached to our service object (setArtist, getArtist, and callItunes). 我们现在能够将'myFactory'注入任何控制器,然后我们就可以调用附加到服务对象(setArtist,getArtist和callItunes)的方法。

app.controller('myFactoryCtrl', function($scope, myFactory){$scope.data = {};$scope.updateArtist = function(){myFactory.setArtist($scope.data.artist);};$scope.submitArtist = function(){myFactory.callItunes().then(function(data){$scope.data.artistData = data;}, function(data){alert(data);})}
});

In the controller above we're injecting in the 'myFactory' service. 在上面的控制器中,我们注入了'myFactory'服务。 We then set properties on our $scope object that are coming from data from 'myFactory'. 然后,我们在$ scope对象上设置属性来自'myFactory'的数据。 The only tricky code above is if you've never dealt with promises before. 上面唯一棘手的代码是,如果你以前从未处理过承诺。 Because callItunes is returning a promise, we are able to use the .then() method and only set $scope.data.artistData once our promise is fulfilled with the iTunes data. 因为callItunes正在返回一个promise,所以我们可以使用.then()方法,只有在我们的承诺与iTunes数据一起完成后才设置$ scope.data.artistData。 You'll notice our controller is very 'thin'. 你会注意到我们的控制器非常“薄”。 All of our logic and persistent data is located in our service, not in our controller. 我们所有的逻辑和持久数据都位于我们的服务中,而不是我们的控制器中。

2) Service 2)服务
Perhaps the biggest thing to know when dealing with creating a Service is that that it's instantiated with the 'new' keyword. 在处理创建服务时,最重要的事情可能是它使用'new'关键字进行实例化。 For you JavaScript gurus this should give you a big hint into the nature of the code. 对于JavaScript JavaScript专家来说,这应该会给你一个关于代码本质的一个很大的暗示。 For those of you with a limited background in JavaScript or for those who aren't too familiar with what the 'new' keyword actually does, let's review some JavaScript fundamentals that will eventually help us in understanding the nature of a Service. 对于那些JavaScript背景有限的人或那些不太熟悉'new'关键字实际工作的人,让我们回顾一下最终有助于我们理解服务性质的JavaScript基础知识。

To really see the changes that occur when you invoke a function with the 'new' keyword, let's create a function and invoke it with the 'new' keyword, then let's show what the interpreter does when it sees the 'new' keyword. 要真正看到使用'new'关键字调用函数时发生的更改,让我们创建一个函数并使用'new'关键字调用它,然后让我们看看解释器在看到'new'关键字时的作用。 The end results will both be the same. 最终结果将是相同的。

First let's create our Constructor. 首先让我们创建我的构造函数。

var Person = function(name, age){this.name = name;this.age = age;
}

This is a typical JavaScript constructor function. 这是一个典型的JavaScript构造函数。 Now whenever we invoke the Person function using the 'new' keyword, 'this' will be bound to the newly created object. 现在每当我们使用'new'关键字调用Person函数时,'this'将绑定到新创建的对象。

Now let's add a method onto our Person's prototype so it will be available on every instance of our Person 'class'. 现在让我们在Person的原型上添加一个方法,这样它就可以在Person'类'的每个实例上使用。

Person.prototype.sayName = function(){alert('My name is ' + this.name);
}

Now, because we put the sayName function on the prototype, every instance of Person will be able to call the sayName function in order alert that instance's name. 现在,因为我们将sayName函数放在原型上,所以Person的每个实例都能够调用sayName函数,以便提示实例的名称。

Now that we have our Person constructor function and our sayName function on its prototype, let's actually create an instance of Person then call the sayName function. 现在我们在其原型上有了Person构造函数和sayName函数,让我们实际创建Person的实例然后调用sayName函数。

var tyler = new Person('Tyler', 23);
tyler.sayName(); //alerts 'My name is Tyler'

So all together the code for creating a Person constructor, adding a function to it's prototype, creating a Person instance, and then calling the function on its prototype looks like this. 因此,创建Person构造函数的代码,向其原型添加函数,创建Person实例,然后在其原型上调用函数就像这样。

var Person = function(name, age){this.name = name;this.age = age;
}
Person.prototype.sayName = function(){alert('My name is ' + this.name);
}
var tyler = new Person('Tyler', 23);
tyler.sayName(); //alerts 'My name is Tyler'

Now let's look at what actually is happening when you use the 'new' keyword in JavaScript. 现在让我们看一下在JavaScript中使用'new'关键字时实际发生的情况。 First thing you should notice is that after using 'new' in our example, we're able to call a method (sayName) on 'tyler' just as if it were an object - that's because it is. 你应该注意的第一件事是在我们的例子中使用'new'后,我们能够在'tyler'上调用一个方法(sayName),就像它是一个对象一样 - 那是因为它是。 So first, we know that our Person constructor is returning an object, whether we can see that in the code or not. 首先,我们知道我们的Person构造函数正在返回一个对象,我们是否可以在代码中看到它。 Second, we know that because our sayName function is located on the prototype and not directly on the Person instance, the object that the Person function is returning must be delegating to its prototype on failed lookups. 其次,我们知道因为我们的sayName函数位于原型而不是直接位于Person实例上,所以Person函数返回的对象必须在失败的查找中委托给它的原型。 In more simple terms, when we call tyler.sayName() the interpreter says “OK, I'm going to look on the 'tyler' object we just created, locate the sayName function, then call it. 换句话说,当我们调用tyler.sayName()时,解释器说“好了,我将查看我们刚创建的'tyler'对象,找到sayName函数,然后调用它。 Wait a minute, I don't see it here - all I see is name and age, let me check the prototype. 等一下,我在这里看不到 - 我只看到名字和年龄,让我查看原型。 Yup, looks like it's on the prototype, let me call it.”. 是的,看起来像是在原型上,让我称之为。“

Below is code for how you can think about what the 'new' keyword is actually doing in JavaScript. 下面是您如何思考'new'关键字在JavaScript中实际执行的操作的代码。 It's basically a code example of the above paragraph. 它基本上是上一段的代码示例。 I've put the 'interpreter view' or the way the interpreter sees the code inside of notes. 我已经把'解释器视图'或解释器看到注释中的代码的方式。

var Person = function(name, age){//The line below this creates an obj object that will delegate to the person's prototype on failed lookups.//var obj = Object.create(Person.prototype);//The line directly below this sets 'this' to the newly created object//this = obj;this.name = name;this.age = age;//return this;
}

Now having this knowledge of what the 'new' keyword really does in JavaScript, creating a Service in Angular should be easier to understand. 现在了解“新”关键字在JavaScript中的实际功能,在Angular中创建服务应该更容易理解。

The biggest thing to understand when creating a Service is knowing that Services are instantiated with the 'new' keyword. 创建服务时要了解的最重要的事情是知道服务是使用'new'关键字实例化的。 Combining that knowledge with our examples above, you should now recognize that you'll be attaching your properties and methods directly to 'this' which will then be returned from the Service itself. 将这些知识与上面的示例相结合,您现在应该认识到您将直接将属性和方法附加到'this',然后从服务本身返回。 Let's take a look at this in action. 我们来看看这个实际情况。

Unlike what we originally did with the Factory example, we don't need to create an object then return that object because, like mentioned many times before, we used the 'new' keyword so the interpreter will create that object, have it delegate to it's prototype, then return it for us without us having to do the work. 与我们最初对Factory示例所做的不同,我们不需要创建对象然后返回该对象,因为像之前多次提到的那样,我们使用了'new'关键字,因此解释器将创建该对象,让它委托给它是原型,然后在没有我们完成工作的情况下将它归还给我们。

First things first, let's create our 'private' and helper function. 首先,让我们创建我们的'私人'和帮助函数。 This should look very familiar since we did the exact same thing with our factory. 这应该看起来非常熟悉,因为我们对我们的工厂做了同样的事情。 I won't explain what each line does here because I did that in the factory example, if you're confused, re-read the factory example. 我不会解释每一行在这里的作用,因为我在工厂示例中这样做,如果您感到困惑,请重新阅读工厂示例。

app.service('myService', function($http, $q){var baseUrl = 'https://itunes.apple.com/search?term=';var _artist = '';var _finalUrl = '';var makeUrl = function(){_artist = _artist.split(' ').join('+');_finalUrl = baseUrl + _artist + '&callback=JSON_CALLBACK'return _finalUrl;}
});

Now, we'll attach all of our methods that will be available in our controller to 'this'. 现在,我们将把我们控制器中可用的所有方法附加到'this'。

app.service('myService', function($http, $q){var baseUrl = 'https://itunes.apple.com/search?term=';var _artist = '';var _finalUrl = '';var makeUrl = function(){_artist = _artist.split(' ').join('+');_finalUrl = baseUrl + _artist + '&callback=JSON_CALLBACK'return _finalUrl;}this.setArtist = function(artist){_artist = artist;}this.getArtist = function(){return _artist;}this.callItunes = function(){makeUrl();var deferred = $q.defer();$http({method: 'JSONP',url: _finalUrl}).success(function(data){deferred.resolve(data);}).error(function(){deferred.reject('There was an error')})return deferred.promise;}});

Now just like in our factory, setArtist, getArtist, and callItunes will be available in whichever controller we pass myService into. 现在就像在我们的工厂一样,setArtist,getArtist和callItunes将在我们传递myService的任何控制器中可用。 Here's the myService controller (which is almost exactly the same as our factory controller). 这是myService控制器(几乎与我们的工厂控制器完全相同)。

app.controller('myServiceCtrl', function($scope, myService){$scope.data = {};$scope.updateArtist = function(){myService.setArtist($scope.data.artist);};$scope.submitArtist = function(){myService.callItunes().then(function(data){$scope.data.artistData = data;}, function(data){alert(data);})}
});

Like I mentioned before, once you really understand what 'new' does, Services are almost identical to factories in Angular. 就像我之前提到的,一旦你真正理解了“新”的含义,服务几乎与Angular的工厂相同。


#6楼

app.factory('fn', fn) vs. app.service('fn',fn) app.factory('fn',fn)与app.service('fn',fn)

Construction 施工

With factories, Angular will invoke the function to get the result. 对于工厂,Angular将调用函数来获得结果。 It is the result that is cached and injected. 它是缓存和注入的结果。

 //factoryvar obj = fn();return obj;

With services, Angular will invoke the constructor function by calling new . 使用服务,Angular将通过调用new来调用构造函数。 The constructed function is cached and injected. 构造的函数被缓存并注入。

  //servicevar obj = new fn();return obj;

Implementation 履行

Factories typically return an object literal because the return value is what's injected into controllers, run blocks, directives, etc 工厂通常返回一个对象文字,因为返回值注入控制器,运行块,指令等的内容

  app.factory('fn', function(){var foo = 0;var bar = 0;function setFoo(val) {foo = val;}function setBar (val){bar = val;}return {setFoo: setFoo,serBar: setBar}});

Service functions typically do not return anything. 服务功能通常不返回任何内容。 Instead, they perform initialization and expose functions. 相反,它们执行初始化和公开函数。 Functions can also reference 'this' since it was constructed using 'new'. 函数也可以引用'this',因为它是使用'new'构造的。

app.service('fn', function () {var foo = 0;var bar = 0;this.setFoo = function (val) {foo = val;}this.setBar = function (val){bar = val;}
});

Conclusion 结论

When it comes to using factories or services they are both very similar. 在使用工厂或服务时,它们都非常相似。 They are injected into a controllers, directives, run block, etc, and used in client code in pretty much the same way. 它们被注入控制器,指令,运行块等,并以几乎相同的方式在客户端代码中使用。 They are also both singletons - meaning the same instance is shared between all places where the service/factory is injected. 它们也都是单例 - 意味着在注入服务/工厂的所有地方之间共享相同的实例。

So which should you prefer? 那你应该选哪个? Either one - they are so similar that the differences are trivial. 任何一个 - 他们是如此相似,以至于差异是微不足道的。 If you do choose one over the other, just be aware how they are constructed, so that you can implement them properly. 如果您确实选择了另一个,请注意它们的构造方式,以便您可以正确实现它们。

查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. angular学习(十三)——Component

    转载请写明来源地址:http://blog.csdn.net/lastsweetop/article/details/56285838 理解Components 在angularjs中,Component是一种特殊的directive,它的配置更简单一些,非常适合组件化的app架构。使用web组件和使用Angular风格的app架构使得编写app更为简便。 Component…...

    2024/4/28 5:17:04
  2. angular ionic移动端 文件打开预览

    angular ionic移动端 文件打开预览 一、插件 我推荐的插件是File Opener&#xff0c;详细请在访问https://ionicframework.com/docs/native/file-opener 首先在node里安装 ionic cordova plugin add cordova-plugin-file-opener2 npm install ionic-native/file-opener 2.引…...

    2024/4/28 5:26:15
  3. angular 学习

    /** * Angular * 解耦应用逻辑&#xff0c;数据模型&#xff0c;视图 * Ajax * 依赖注入 * 浏览历史 * 测试 * 为了表示内部和内置函数库&#xff0c;Angular使用预定义对象&#xff0c;类似于jQuery但是l两者完全没有关系&#xff0c;只要是遇到就可以看成是一个Angula…...

    2024/4/28 6:39:02
  4. Angular axios post跨域 qs报错

    Angular axios post跨域 qs报错解决Post跨域引入qs解决qs报错解决Post跨域 修改headers axios.post(requestUrl,qs.stringify({where: this.validateForm.value.where,f: pjson}),{headers: {//设置headers解决Post跨域content-type: application/x-www-form-urlencoded,}}).…...

    2024/4/20 6:36:49
  5. angular中监听resize事件

    参考&#xff1a;https://www.jianshu.com/p/8e746a6c8ac2 import { Observable } from rxjs;// 页面监听Observable.fromEvent(window, resize).debounceTime(300) // 以免频繁处理.subscribe((event) > {// 这里处理页面变化时的操作console.log(come on ..);});如何监听…...

    2024/4/28 3:38:55
  6. Angular 定时器$timeout和$interval

    项目中有用到定时器定时刷新页面的数据&#xff0c;在网上查看了一些资料&#xff0c;整理了一下&#xff0c;备忘。 $timeout 用法如下&#xff1a;$timeout(fn,[delay],[invokeApply]); fn&#xff1a;一个将被延迟执行的函数。delay&#xff1a;延迟的时间&#xff08;毫…...

    2024/4/28 12:53:51
  7. angular4-事件绑定

    事件绑定语法&#xff08;可以通过 (事件名) 的语法&#xff0c;实现事件绑定&#xff09; <date-picker (dateChanged)"statement()"></date-picker> 等价于&#xff1a; <date-picker on-dateChanged"statement()"></date-picker&g…...

    2024/4/21 2:34:10
  8. angular 事件绑定bind

    转载自 http://www.ngui.cc/news/show-105.html 在 Angular 中&#xff0c;我们可以通过 (eventName) 的语法&#xff0c;实现事件绑定。 基础知识 事件绑定语法 <date-picker (dateChanged)"statement()"></date-picker> 等价于 <date-picker on-d…...

    2024/4/28 12:13:15
  9. angular中$state.go页面跳转并传递参数

    遇到一个页面跳转的时候&#xff0c;在跳转后的页面获取跳转前页面的数据,我想到用一种是localstorage&#xff0c;一种用broadcast和on&#xff0c;然后老大说不用这么麻烦&#xff0c;既然都$state.go了直接带参数&#xff0c;这次就介绍一下$state.go页面跳转传递参数。1.路…...

    2024/4/28 7:04:13
  10. angular material table 中行的点击事件

    关于angular material table 点击当前某一行后&#xff0c;改变当前行的样式需求介绍html代码css代码ts代码需求介绍 我有一个表格&#xff0c;当我点击表格中的某一行时&#xff0c;该行要改变背景颜色&#xff0c;再次点击恢复点击之前的背景颜色。 html代码 <mat-form…...

    2024/4/21 2:34:07
  11. Angular 监听路由变化事件

    摘要: $stateChangeStart- 当模板开始解析之前触发 $rootScope.$on($stateChangeStart, function(event, toState, toParams, fromState, fromParams){ ... }) app.run([$rootScope, $location ,$cookieStore, $state, CacheManager, function($rootScope, $location, $cookie…...

    2024/4/21 2:34:06
  12. angular之$location基本用法

    一. 获取url的相关方法: 以 ‘http://localhost/location/21.1location/21.1%20location/21.1location.html#/foo?namebunny#myhash’ 这个路径为例: 1. 获取当前完整的url路径: location.absUrl()://http://localhost/location.absUrl(): // http://localhost/location.abs…...

    2024/4/20 20:22:08
  13. img标签中的onerror事件在angular2中绑定

    对于img标签路径加载失败是的处理(onerror事件) <!-- angular2中的写法 --> <img *ngIf"showLogo" [src]"logoUrl" alt"logo" class"logo" (error)"imgerror($event)"> <!-- html页面中的写法 --> <i…...

    2024/4/20 20:22:07
  14. (笔记)angular 的hover事件

    &#xff08;笔记&#xff09;angular 的hover事件 posted on 2015-12-04 15:56 发哥要做活神仙(笔记) 阅读(...) 评论(...) 编辑 收藏 转载于:https://www.cnblogs.com/91allan/p/5019534.html...

    2024/4/20 20:22:06
  15. angular事件

    http://www.cooklife.cn/detail/54c8f838ed5b52846b6bca41#View 对于一款前端框架&#xff0c;提起事件&#xff0c;很容易让人联想到DOM事件&#xff0c;比如说鼠标点击以及页面滚动等。但是我们这里说的angular中的事件和DOM事件并不是一个东西。 事件的发布 我们可以通过$e…...

    2024/4/26 8:28:15
  16. angular利用$location实现搜索功能。

    angular $location服务的主要作用是用于获取当前url以及改变当前的url,也就是做搜索功能。具体看你们后端给你们的api,拼成适合的字符串 一. 获取url的相关方法: 以 ‘http://localhost/$location/21.1%20$location.html#/foo?namebunny#myhash’ 这个路径为例: 1. 获取当前完…...

    2024/4/21 2:34:05
  17. angular中全局事件绑定

    angular.module(myApp,[]).run([$rootScope, function($rootScope) {$rootScope.$on($stateChangeStart, function(evt, next, current) {console.log(evt);}); }]); ### 此处是绑定全局事件 其他事件名称自行查找 事件函数为路由开始发生改变的时候触发&#xff0c;犹豫每次切…...

    2024/4/21 2:34:05
  18. 浅谈Angular的 $http, $q, defer, promise

    $http $http 服务&#xff1a;只是简单封装了浏览器原生的XMLHttpRequest对象&#xff0c;接收一个参数&#xff0c;这个参数是一个对象&#xff0c;包含了用来生成HTTP请求的配置内容&#xff0c;这个函数返回一个promise对象&#xff0c;具有success和error方法。 $http服务…...

    2024/4/21 2:34:03
  19. 理解angularjs中的$emit,$broadcast和$on

    在angularjs中提供了emit,emit,broadcast和$on服务用于控制器之间基础事件的传递交流。 AngularJS中的作用域有一个非常有层次和嵌套分明的结构。其中它们都有一个主要的$rootScope(也就说对应的Angular应用或者ng-app)&#xff0c;然后其他所有的作用域部分都是继承自这个$roo…...

    2024/4/21 2:34:02
  20. (笔记)angular里controller跨域传值($rootScope/广播事件)

    一、父controller与子controller定义了相同的变量 父controller 与 子controller 有相同的变量 &#xff0c; 则优先使用子controller的变量 。若子controller没有&#xff0c;则往上查找。类似于js的作用链 二、通过声明$rootScope全局变量 app.run 可声明全局变量 $rootSco…...

    2024/4/22 9:18:39

最新文章

  1. Windows系统中下Oracle 19C数据库超级详细安装、设置教程(自己电脑上安装Oracle学习,保姆级教学,亲测有效)

    Oracle 官方提供了一个基于 Java 技术的图形界面安装工具&#xff1a;Oracle Universal Installer&#xff08;Oracle 通用安装器&#xff09;简称 OUI&#xff0c;利用它可以完成在不同操作系统平台上&#xff08;Windows、Linux、UNIX&#xff09;的、不同类型的、不同版本的…...

    2024/4/28 18:19:29
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/3/20 10:50:27
  3. Topaz Video AI for Mac v5.0.0激活版 视频画质增强软件

    Topaz Video AI for Mac是一款功能强大的视频处理软件&#xff0c;专为Mac用户设计&#xff0c;旨在通过人工智能技术为视频编辑和增强提供卓越的功能。这款软件利用先进的算法和深度学习技术&#xff0c;能够自动识别和分析视频中的各个元素&#xff0c;并进行智能修复和增强&…...

    2024/4/27 12:49:51
  4. k8s_入门_kubelet安装

    安装 在大致了解了一些k8s的基本概念之后&#xff0c;我们实际部署一个k8s集群&#xff0c;做进一步的了解 1. 裸机安装 采用三台机器&#xff0c;一台机器为Master&#xff08;控制面板组件&#xff09;两台机器为Node&#xff08;工作节点&#xff09; 机器的准备有两种方式…...

    2024/4/23 6:23:48
  5. 【外汇早评】美通胀数据走低,美元调整

    原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...

    2024/4/28 13:52:11
  6. 【原油贵金属周评】原油多头拥挤,价格调整

    原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...

    2024/4/28 3:28:32
  7. 【外汇周评】靓丽非农不及疲软通胀影响

    原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...

    2024/4/26 23:05:52
  8. 【原油贵金属早评】库存继续增加,油价收跌

    原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...

    2024/4/28 13:51:37
  9. 【外汇早评】日本央行会议纪要不改日元强势

    原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...

    2024/4/27 17:58:04
  10. 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响

    原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...

    2024/4/27 14:22:49
  11. 【外汇早评】美欲与伊朗重谈协议

    原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...

    2024/4/28 1:28:33
  12. 【原油贵金属早评】波动率飙升,市场情绪动荡

    原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...

    2024/4/28 15:57:13
  13. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

    原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...

    2024/4/27 17:59:30
  14. 【原油贵金属早评】市场情绪继续恶化,黄金上破

    原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...

    2024/4/25 18:39:16
  15. 【外汇早评】美伊僵持,风险情绪继续升温

    原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...

    2024/4/28 1:34:08
  16. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

    原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...

    2024/4/26 19:03:37
  17. 氧生福地 玩美北湖(上)——为时光守候两千年

    原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...

    2024/4/28 1:22:35
  18. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

    原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...

    2024/4/25 18:39:14
  19. 氧生福地 玩美北湖(下)——奔跑吧骚年!

    原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...

    2024/4/26 23:04:58
  20. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

    原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...

    2024/4/27 23:24:42
  21. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

    原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...

    2024/4/28 5:48:52
  22. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

    原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...

    2024/4/26 19:46:12
  23. 广州械字号面膜生产厂家OEM/ODM4项须知!

    原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...

    2024/4/27 11:43:08
  24. 械字号医用眼膜缓解用眼过度到底有无作用?

    原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...

    2024/4/27 8:32:30
  25. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  26. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  27. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  28. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  29. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  30. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  31. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  32. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  33. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  34. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  35. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  36. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  37. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  38. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  39. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  40. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  41. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  42. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  43. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  44. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57