angular手机应用

In this article, we’re going to set up a Laravel API with Angular Material for the front end. We’re also going to follow best practices that will help us scale with the number of developers working on the project and the complexity behind it. Most tutorials cover this topic from another perspective – they completely forget about scaling. While this tutorial is not targeted at small todo apps, it is extremely helpful if you’re planning to work with other developers on a big project.

在本文中,我们将为前端设置一个带有Angular Material的Laravel API。 我们还将遵循最佳实践,这将帮助我们扩大从事该项目的开发人员的数量及其背后的复杂性。 大多数教程从另一个角度介绍了此主题-他们完全忘记了扩展。 虽然本教程并非针对小型的待办事项应用程序,但是如果您打算与其他开发人员合作进行大型项目,则本教程将非常有用。

Laravel angular material

Here’s a demo built with Laravel and Angular Material.

这是一个使用Laravel和Angular Material构建的演示 。

设置Laravel (Setting up Laravel)

建立专案 (Creating a project)

We’re going to start by pulling in the latest Laravel – 5.1 at the time of writing.

在撰写本文时,我们将从引入最新的Laravel 5.1开始。

composer create-project laravel/laravel myapp --prefer-dist

配置环境 (Configuring the environment)

All the subsequent commands will be ran inside the myapp directory. Throughout the remainder of this tutorial, we’ll assume you’re running a Linux environment if you’re following along. If you aren’t you’re encouraged to install Homestead Improved as a virtual Linux environment in which to follow along.

所有后续命令将在myapp目录中运行。 在本教程的其余部分中,如果您遵循以下步骤,我们将假定您正在运行Linux环境。 如果不是这样,建议您将Homestead Improvement安装为可跟随的虚拟Linux环境。

cd myapp

Next, we’re going to update our .env file with the database connection credentials:

接下来,我们将使用数据库连接凭据更新.env文件:

DB_HOST=localhost
DB_DATABASE=your-db-name
DB_USERNAME=your-username
DB_PASSWORD=your-password

Once your app has been configured, you should see the Laravel 5 greeting page.

配置好应用程序后,您应该会看到Laravel 5问候页面。

Laravel 5

调试栏 (Debugbar)

Laravel debug bar is one of the most useful Laravel packages.

Laravel调试栏是最有用的Laravel软件包之一。

Debugbar makes it easy to debug any of the following:

Debugbar使调试以下任何一项变得容易:

  • exceptions

    例外情况
  • views

    意见
  • messages

    讯息
  • queries

    查询
  • mails

    邮件
  • auth

    认证
  • routes

    路线
  • ajax

    阿贾克斯
  • and more

    和更多
Laravel debugbar

So let’s go ahead and install it using composer

因此,让我们继续使用composer进行安装

composer require barryvdh/laravel-debugbar

Next, we need to open config/app.php and:

接下来,我们需要打开config/app.php并:

  • add Barryvdh\Debugbar\ServiceProvider::class, to the list of providers

    Barryvdh\Debugbar\ServiceProvider::class,添加到providers列表中

  • add 'Debugbar' => Barryvdh\Debugbar\Facade::class, to the list of aliases

    'Debugbar' => Barryvdh\Debugbar\Facade::class,aliases列表中

Refresh the page and you should see debugbar at the bottom of the page!

刷新页面,您将在页面底部看到debugbar栏!

Debugbar runs automatically if you have the APP_DEBUG flag enabled in your .env file.

如果您在.env文件中启用了APP_DEBUG标志,则Debugbar将自动运行。

构建自动化 (Build automation)

Laravel’s Elixir is a layer on top of gulp that makes it easier to write gulp tasks.

Laravel的药剂是在之上的一层gulp ,使得它更容易编写一口任务。

建立 (Setup)

We’ll start by installing gulp globally. Note that you need nodeJS installed for this section.

我们将从全局安装gulp开始。 请注意,此部分需要安装nodeJS。

npm install -g gulp

and then we need to grab a few packages that will make our lives easier, so replace your package.json with the following:

然后我们需要获取一些可以使我们的生活更轻松的软件包,因此,用以下代码替换您的package.json

{
"dependencies": {
"gulp-concat": "^2.6.0",
"gulp-concat-sourcemap": "^1.3.1",
"gulp-filter": "^1.0.2",
"gulp-if": "^1.2.5",
"gulp-jshint": "^1.9.0",
"gulp-minify-css": "^0.3.11",
"gulp-ng-annotate": "^1",
"gulp-notify": "^2.0.0",
"gulp-sourcemaps": "^1",
"gulp-uglify": "^1",
"jshint-stylish": "^2",
"laravel-elixir": "^3.0.0",
"laravel-elixir-livereload": "^1.1.1",
"main-bower-files": "^2.1.0"
},
"devDependencies": {
"gulp": "^3.9.0"
}
}

Then install these packages.

然后安装这些软件包。

npm install

管理前端依赖项 (Managing front-end dependencies)

I like to use Bower because of its flat dependency tree, but that’s really up to your preference. You can use npm, requirejs or just the plain old browse-to-url-and-download-and-then-manually-check-for-updates.

我喜欢使用Bower,因为它具有扁平的依赖关系树 ,但这确实取决于您的偏好。 您可以使用npm,requirejs或仅使用普通的旧版本浏览至URL并下载,然后手动检查更新

Let’s install bower globally.

让我们在全球范围内安装凉亭。

npm install -g bower

Then add this line to .gitignore:

然后将此行添加到.gitignore

/bower_components

/bower_components

and run bower init to create a new bower.json file which will be committed in the repository.

并运行bower init来创建一个新的bower.json文件,该文件将在存储库中提交。

按功能文件夹 (Folder by Feature)

Then, we want to choose a location for Angular within our Laravel folder.

然后,我们想在Laravel文件夹中为Angular选择一个位置。

Most people prefer to add it to resources/js but since I prefer to have a folder by feature architecture, we’re going to create an angular folder at the root level.

大多数人都喜欢将其添加到resources/js但是由于我更喜欢按要素体系结构创建文件夹,因此我们将在根级别创建一个angular文件夹。

I chose this setup because we want it to be able to scale with the number of developers and with the business complexity behind it.

我选择此设置是因为我们希望它能够随着开发人员数量以及背后的业务复杂性进行扩展。

A few months from now, we’re going to have a folder for every feature. Here’s an example of the folders that we are going to have inside angular/app:

从现在开始的几个月后,我们将为每个功能提供一个文件夹。 这是我们将在angular/app包含的文件夹的示例:

  • header

    标头

    • header.html

      header.html
    • header.js

      header.js
    • header.less

      无标题
  • login

    登录

    • login.html

      login.html
    • login.js

      login.js
    • login.less

      无登录
    • service.js

      service.js
  • landing

    降落
  • users

    使用者
  • change_password

    更改密码
  • reset_password

    重设密码
  • list_items

    list_items
  • add_item

    新增项目
  • item_details

    item_details

It’s much easier to fix bugs in the list_items page. We just have to open the list_items folder where we find all the related files for this feature:

list_items页面中修复错误要容易得多。 我们只需要打开list_items文件夹,即可在其中找到此功能的所有相关文件:

  • templates

    范本
  • Less files

    文件少
  • Angular controller(s)

    角度控制器
  • Angular service(s).

    角度服务。

Compare this to having to open a folder for each of these files when debugging a single feature.

与此相比,调试单个功能时必须为每个文件打开一个文件夹。

So let’s go ahead and create the following folders:

因此,让我们继续创建以下文件夹:

  • angular

    angular

  • angular/app

    angular/app

  • angular/services

    angular/services

  • angular/filters

    angular/filters

  • angular/directives

    angular/directives

  • angular/config

    angular/config

药剂配置 (Elixir configuration)

Now we need to configure elixir to compile a js/vendor.js and a css/vendor.css file from the bower_components folder.

现在,我们需要配置elixir以从bower_components文件夹中编译js/vendor.jscss/vendor.css文件。

Then we need to run our angular folder through the elixir angular task, which does the following:

然后,我们需要通过长生不老药的angular任务来运行角度文件夹,该任务执行以下操作:

  • concatenates our app files into public/js/app.js

    将我们的应用程序文件连接到public/js/app.js

  • validates with jshint (if the .jshintrc file is available). If the file is available, it won’t recompile our source code if your code does not pass validation.

    使用jshint进行验证(如果.jshintrc文件可用)。 如果该文件可用,则如果您的代码未通过验证,它将不会重新编译我们的源代码。

  • automatic dependency annotation using ng-annotate

    使用ng-annotate自动依赖注释

We need to compile our less files. If you’re using Sass, you probably know how to make it work for Sass.

我们需要编译较少的文件。 如果您使用的是Sass,则可能知道如何使其适用于Sass。

We also need to copy our views from within the angular directory to the public directory.

我们还需要将视图从angular目录内复制到public目录。

Finally, we are going to set up livereload. Soft reloads are used for CSS, meaning that a newer version of your css will be injected without reloading the page.

最后,我们将设置livereload。 软重新加载用于CSS,这意味着将在不重新加载页面的情况下注入新版本CSS。

Let’s open gulpfile.js and replace the sample Elixir function call with the following:

让我们打开gulpfile.js并将示例Elixir函数调用替换为以下内容:

var elixir = require('laravel-elixir');
require('./tasks/angular.task.js');
require('./tasks/bower.task.js');
require('laravel-elixir-livereload');
elixir(function(mix){
mix
.bower()
.angular('./angular/')
.less('./angular/**/*.less', 'public/css')
.copy('./angular/app/**/*.html', 'public/views/app/')
.copy('./angular/directives/**/*.html', 'public/views/directives/')
.copy('./angular/dialogs/**/*.html', 'public/views/dialogs/')
.livereload([
'public/js/vendor.js',
'public/js/app.js',
'public/css/vendor.css',
'public/css/app.css',
'public/views/**/*.html'
], {liveCSS: true});
});

If you noticed, I’m loading a couple of custom tasks, so you just need to create the tasks folder at the root directory of the project and create these 2 files:

如果您注意到了,我正在加载几个自定义任务,因此您只需要在项目的根目录中创建tasks文件夹并创建这两个文件:

tasks/angular.task.js

任务/ angular.task.js

/*Elixir Task
*copyrights to https://github.com/HRcc/laravel-elixir-angular
*/
var gulp = require('gulp');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var uglify = require('gulp-uglify');
var ngAnnotate = require('gulp-ng-annotate');
var notify = require('gulp-notify');
var gulpif = require('gulp-if');
var Elixir = require('laravel-elixir');
var Task = Elixir.Task;
Elixir.extend('angular', function(src, output, outputFilename) {
var baseDir = src || Elixir.config.assetsPath + '/angular/';
new Task('angular in ' + baseDir, function() {
// Main file has to be included first.
return gulp.src([baseDir + "main.js", baseDir + "**/*.js"])
.pipe(jshint())
.pipe(jshint.reporter(stylish))
//.pipe(jshint.reporter('fail')).on('error', onError) //enable this if you want to force jshint to validate
.pipe(gulpif(! config.production, sourcemaps.init()))
.pipe(concat(outputFilename || 'app.js'))
.pipe(ngAnnotate())
.pipe(gulpif(config.production, uglify()))
.pipe(gulpif(! config.production, sourcemaps.write()))
.pipe(gulp.dest(output || config.js.outputFolder))
.pipe(notify({
title: 'Laravel Elixir',
subtitle: 'Angular Compiled!',
icon: __dirname + '/../node_modules/laravel-elixir/icons/laravel.png',
message: ' '
}));
}).watch(baseDir + '/**/*.js');
});

tasks/bower.task.js

任务/ower.task.js

/*Elixir Task for bower
* Upgraded from https://github.com/ansata-biz/laravel-elixir-bower
*/
var gulp = require('gulp');
var mainBowerFiles = require('main-bower-files');
var filter = require('gulp-filter');
var notify = require('gulp-notify');
var minify = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var concat_sm = require('gulp-concat-sourcemap');
var concat = require('gulp-concat');
var gulpIf = require('gulp-if');
var Elixir = require('laravel-elixir');
var Task = Elixir.Task;
Elixir.extend('bower', function(jsOutputFile, jsOutputFolder, cssOutputFile, cssOutputFolder) {
var cssFile = cssOutputFile || 'vendor.css';
var jsFile = jsOutputFile || 'vendor.js';
if (!Elixir.config.production){
concat = concat_sm;
}
var onError = function (err) {
notify.onError({
title: "Laravel Elixir",
subtitle: "Bower Files Compilation Failed!",
message: "Error: <%= error.message %>",
icon: __dirname + '/../node_modules/laravel-elixir/icons/fail.png'
})(err);
this.emit('end');
};
new Task('bower-js', function() {
return gulp.src(mainBowerFiles())
.on('error', onError)
.pipe(filter('**/*.js'))
.pipe(concat(jsFile, {sourcesContent: true}))
.pipe(gulpIf(Elixir.config.production, uglify()))
.pipe(gulp.dest(jsOutputFolder || Elixir.config.js.outputFolder))
.pipe(notify({
title: 'Laravel Elixir',
subtitle: 'Javascript Bower Files Imported!',
icon: __dirname + '/../node_modules/laravel-elixir/icons/laravel.png',
message: ' '
}));
}).watch('bower.json');
new Task('bower-css', function(){
return gulp.src(mainBowerFiles())
.on('error', onError)
.pipe(filter('**/*.css'))
.pipe(concat(cssFile))
.pipe(gulpIf(config.production, minify()))
.pipe(gulp.dest(cssOutputFolder || config.css.outputFolder))
.pipe(notify({
title: 'Laravel Elixir',
subtitle: 'CSS Bower Files Imported!',
icon: __dirname + '/../node_modules/laravel-elixir/icons/laravel.png',
message: ' '
}));
}).watch('bower.json');
});

These 2 gulp tasks might look a bit complex, but you don’t have to worry about that. You’re here to speed up your development process rather than wasting time setting up build tools.

这两个gulp任务可能看起来有些复杂,但是您不必为此担心。 您来这里是为了加快开发过程,而不是浪费时间设置构建工具。

The reason why I’m not using some of the available node modules that are available online, is because, at the time of writing, they are slow and often limited in terms of functionality. Enjoy!

我之所以不使用某些在线可用的可用节点模块,是因为在编写本文时,它们很慢,并且在功能方面常常受到限制。 请享用!

设置AngularJS (Setting up AngularJS)

安装 (Installation)

Let’s get started by downloading the latest version of Angular 1

让我们开始下载最新版本的Angular 1

bower install angular#1 --save

Don’t forget the --save flag because we want this to be saved in bower.json

不要忘记--save标志,因为我们希望将其保存在bower.json

We can now run gulp && gulp watch.

现在,我们可以运行gulp && gulp watch

配置主模块 (Configuring Main Module)

Let’s start by configuring angular/main.js

让我们从配置angular/main.js

(function(){
"use strict";
var app = angular.module('app',
[
'app.controllers',
'app.filters',
'app.services',
'app.directives',
'app.routes',
'app.config'
]);
angular.module('app.routes', []);
angular.module('app.controllers', []);
angular.module('app.filters', []);
angular.module('app.services', []);
angular.module('app.directives', []);
angular.module('app.config', []);
})();

桥接Laravel和Angular (Bridging Laravel & Angular)

服务应用 (Serving the App)

We need to create a new controller using artisan.

我们需要使用工匠创建一个新的控制器。

php artisan make:controller AngularController --plain
AngularController.php
public function serveApp(){
return view('index');
}

and then replace the existing Route::get('/', ...) in routes.php with the following:

然后取代现有的Route::get('/', ...)routes.php有以下几点:

Route::get('/', 'AngularController@serveApp');

This seems useless at first, but I like to keep the logic outside the Routes file, so I prefer not to have closures there. Eventually, we’re going to use this controller for other methods, like the unsupported browser page.

起初这似乎没有用,但是我希望将逻辑保留在Routes文件之外,因此我不希望在此处关闭。 最终,我们将将此控制器用于其他方法,例如不受支持的浏览器页面。

Then, we need to create the view resources/views/index.blade.php and add this HTML:

然后,我们需要创建视图resources/views/index.blade.php并添加以下HTML:

<html ng-app="app">
<head>
<link rel="stylesheet" href="/css/vendor.css">
<link rel="stylesheet" href="/css/app.css">
</head>
<body>
<md-button class="md-raised md-primary">Welcome to Angular Material</md-button>
<script src="/js/vendor.js"></script>
<script src="/js/app.js"></script>
</body>
</html>

不支持的浏览器 (Unsupported Browser)

Angular Material is targeted at evergreen browsers, so we need to add a page for unsupported ones ( IE <= 10 ).

Angular Material是针对常绿浏览器的,因此我们需要为不支持的浏览器添加页面(IE <= 10)。

We start by adding the following conditional comment in the <head> of our index.blade.php view:

我们首先在index.blade.php视图的<head>中添加以下条件注释:

<!--[if lte IE 10]>
<script type="text/javascript">document.location.href ='/unsupported-browser'</script>
<![endif]-->

This will redirect the user with an unsupported browser to /unsupported-browser, a route which we should handle in routes.php:

这会将使用不受支持的浏览器的用户重定向到/unsupported-browser ,这是我们应该在routes.php处理的路由:

Route::get('/unsupported-browser', 'AngularController@unsupported');

Then, inside AngularController we create the unsupported method:

然后,在AngularController内部,我们创建unsupported方法:

public function unsupported(){
return view('unsupported');
}

Finally, we create the unsupported.blade.php view and output a message telling the user that they needs to upgrade to a modern browser.

最后,我们创建unsupported.blade.php视图并输出一条消息,告知用户他们需要升级到现代浏览器。

引入角材料 (Pulling in Angular Material)

Angular Material is an implementation of Material Design in Angular.js. It provides a set of reusable, well-tested, and accessible UI components based on the Material Design system.

Angular Material是Angular.js中Material Design的实现。 它提供了一组基于Material Design系统的可重用,经过良好测试和可访问的UI组件。

安装 (Installation)

First we pull Angular Material using Bower:

首先,我们使用Bower拉角材料:

bower install angular-material --save

Then, we add the ngMaterial module to the app.controllers and app.config modules:

然后,我们将ngMaterial模块添加到app.controllersapp.config模块中:

angular.module('app.controllers', ['ngMaterial']);
angular.module('app.config', ['ngMaterial']);

Finally, we re-run gulp watch.

最后,我们重新运行gulp watch

自定义主题 (Custom theming)

You probably love the feel that Angular Material gives to your app, but you’re worried that it’ll look exactly like Angular Material.

您可能喜欢Angular Material给您的应用程序带来的感觉,但您担心它看起来会与Angular Material完全一样。

We’ll want to apply some branding guidelines to the theme, which is why we need to create a new config provider for Angular Material which allows us to specify the 3 main colors for our theme:

我们将对主题应用一些商标准则,这就是为什么我们需要为Angular Material创建一个新的配置提供程序,该提供程序允许我们为主题指定3种主要颜色:

/angular/config/theme.js:
(function(){
"use strict";
angular.module('app.config').config( function($mdThemingProvider) {
/* For more info, visit https://material.angularjs.org/#/Theming/01_introduction */
$mdThemingProvider.theme('default')
.primaryPalette('teal')
.accentPalette('cyan')
.warnPalette('red');
});
})();

设置UI路由器 (Setting up ui-router)

ui-router is the de-facto solution to flexible routing with nested views.

ui-router是使用嵌套视图进行灵活路由的实际解决方案。

安装 (Installation)

Let’s start by pulling that in using bower:

让我们开始使用Bower:

bower install  ui-router --save

Then, add the ui.router module to the app.routes and app.controllers modules:

然后,将ui.router模块添加到app.routesapp.controllers模块中:

angular.module('app.routes', ['ui.router']);
angular.module('app.controllers', ['ngMaterial', 'ui.router']);

Then, we re-run gulp watch.

然后,我们重新运行gulp watch

配置路由 (Configuring routes)

Now we need to set up our routes file. Let’s go ahead and create angular/routes.js

现在我们需要设置路由文件。 让我们继续创建angular/routes.js

(function(){
"use strict";
angular.module('app.routes').config( function($stateProvider, $urlRouterProvider ) {
var getView = function( viewName ){
return '/views/app/' + viewName + '/' + viewName + '.html';
};
$urlRouterProvider.otherwise('/');
$stateProvider
.state('landing', {
url: '/',
views: {
main: {
templateUrl: getView('landing')
}
}
}).state('login', {
url: '/login',
views: {
main: {
templateUrl: getView('login')
},
footer: {
templateUrl: getView('footer')
}
}
});
} );
})();

We created 2 routes, one for the Landing page and the other for the Login page. Notice how we have multiple named views. We need to add that to our main view, inside the <body>:

我们创建了2条路线,一条用于“着陆”页面,另一条用于“登录”页面。 注意我们如何有多个命名视图。 我们需要在<body>内部将其添加到我们的主视图中:

<div ui-view="main"></div>
<div ui-view="footer"></div>

We then create the following folders and files inside angular/app:

然后,我们在angular/app创建以下文件夹和文件:

  • landing/landing.html with the output Landing view

    Landing view landing/landing.html和输出Landing view

  • login/login.html with the output Login view

    login/login.html和输出“ Login view

  • footer/footer.html with the output Footer view

    footer/footer.html和输出Footer view

Now, whenever you need to add a new page, you just have to add a new .state().

现在,每当需要添加新页面时,只需添加一个新的.state()

设置矩形 (Setting up Restangular)

Restangular is an AngularJS service that simplifies common ajax calls to a RESTful API.

Restangular是AngularJS服务,可简化对RESTful API的常见ajax调用。

安装 (Installation)

Restangular is a perfect fit with our Laravel API.

Restangular非常适合我们的Laravel API。

Let’s grab the latest version of Restangular by running the following:

让我们通过运行以下命令来获取最新版本的Restangular:

bower install restangular --save

Then, add the restangular module to the app.controllers module:

然后,将restangular模块添加到app.controllers模块:

angular/main.js:
angular.module('app.controllers', ['ngMaterial', 'ui.router', 'restangular']);

Then, re-run gulp watch.

然后,重新运行gulp watch

Let’s set up a sample API endpoint.

让我们设置一个示例API端点。

php artisan make:controller DataController --plain
DataController.php:
public function index(){
return ['data', 'here'];
}
app\Http\routes.php:
Route::get('/data', 'DataController@index');

Sample Usage:

用法示例:

Restangular.all('data').doGET().then(function(response){
window.console.log(response);
});

吐司 (Toast)

A toast provides simple feedback about an operation in a small popup.

吐司可在一个小弹出窗口中提供有关操作的简单反馈。

Toast

Since we’re going to use toasts a lot in our application, we’re going to create a toast service angular/services/toast.js

由于我们将在应用程序中大量使用Toast,因此我们将创建Toast服务angular/services/toast.js

(function(){
"use strict";
angular.module("app.services").factory('ToastService', function( $mdToast ){
var delay = 6000,
position = 'top right',
action = 'OK';
return {
show: function(content) {
return $mdToast.show(
$mdToast.simple()
.content(content)
.position(position)
.action(action)
.hideDelay(delay)
);
}
};
});
})();

And now here’s how we can use it in our app:

现在,我们介​​绍了如何在应用程序中使用它:

(function(){
"use strict";
angular.module('app.controllers').controller('TestCtrl', function( ToastService ){
ToastService.show('User added successfully');
};
});
})();

对话方块 (Dialogs)

Dialogs are one of the most useful features available in Angular Material. They’re very similar to Modals in Twitter Bootstrap.

对话框是Angular Material中可用的最有用的功能之一。 它们与Twitter Bootstrap中的Modals非常相似。

Material Dialog

Dialogs are a key component in Single Page Apps, that’s why we’re going to write a powerful dialog service /angular/services/dialog.js

对话框是Single Page Apps中的关键组件,因此我们要编写功能强大的对话框服务/angular/services/dialog.js

(function(){
"use strict";
angular.module("app.services").factory('DialogService', function( $mdDialog ){
return {
fromTemplate: function( template, $scope ) {
var options = {
templateUrl: '/views/dialogs/' + template + '/' + template + '.html'
};
if ( $scope ){
options.scope = $scope.$new();
}
return $mdDialog.show(options);
},
hide: function(){
return $mdDialog.hide();
},
alert: function(title, content){
$mdDialog.show(
$mdDialog.alert()
.title(title)
.content(content)
.ok('Ok')
);
}
};
});
})();

We created 3 methods inside this service:

我们在此服务内创建了3种方法:

  • alert(title, content) allows us to display a dialog with a title and a message. Useful for error and success messages

    alert(title, content)允许我们显示一个带有标题和消息的对话框。 对于错误和成功消息很有用

  • hide() hides the dialog

    hide()隐藏对话框

  • fromTemplate(template, $scope) creates a dialog from a template stored in /angular/dialogs/. Useful for Login, Reigster, etc. dialogs. You can create your own component inside the /angular/dialogs/ directory using the same folder by feature approach. You can also pass $scope to the dialog, which will give you access to the $parent scope from within the dialog’s controller.

    fromTemplate(template, $scope)/angular/dialogs/存储的模板创建一个对话框。 对于登录,Reigster等对话框很有用。 您可以通过功能相同的文件夹在/angular/dialogs/目录中创建自己的组件。 您还可以将$scope传递给对话框,这将使您可以从对话框的控制器内访问$parent范围。

We just need to fix the Elixir configuration to watch and copy the /angular/dialogs folder:

我们只需要修复Elixir配置即可观察和复制/angular/dialogs文件夹:

.copy('angular/dialogs/**/*.html', 'public/views/dialogs/');

And now here’s how we can use it in our app:

现在,我们介​​绍了如何在应用程序中使用它:

(function (){
"use strict";
angular.module('app.controllers').controller('DialogTestCtrl', function ($scope, DialogService){
$scope.addUser = function(){
return DialogService.fromTemplate('add_user', $scope);
};
$scope.success = function(){
return DialogService.alert('Success', 'User created successfully!');
};
});
})();

部署方式 (Deployment)

Here’s a plain bash script that we’re going to use for deployment. You can save it as deploy.sh.

这是我们将用于部署的普通bash脚本。 您可以将其另存为deploy.sh

You’d just need to prepend it with an ssh command to your server ssh@your-domain.

您只需要在服务器ssh@your-domain前面加上ssh命令即可。

php artisan route:clear
php artisan config:clear
git pull
php artisan migrate
composer install
php artisan route:cache
php artisan config:cache
php artisan optimize

The first two commands clear the route and configuration cache, which will then be generated again after pulling the new code. This will greatly improve the performance of your app when running in production.

前两个命令清除路由和配置缓存,然后在提取新代码后再次生成路由和配置缓存。 在生产环境中运行时,这将大大提高应用程序的性能。

Don’t forget that any configuration/routing change you make will not take effect until you clear the cache again.

不要忘记,您所做的任何配置/路由更改都不会生效,直到您再次清除缓存。

代码质量 (Code Quality)

Enforcing code quality helps the maintenance of big projects. You don’t want to end up with a terrible code base a few months from now. This is completely optional, but I’d recommend you set up some automated code quality tools.

加强代码质量有助于维护大型项目。 从现在开始几个月后,您都不想得到一个糟糕的代码库。 这是完全可选的,但是我建议您设置一些自动化的代码质量工具。

We’re going to start by installing the necessary node modules:

我们将从安装必要的节点模块开始:

npm install -g jshint jscs

编辑器配置 (EditorConfig)

EditorConfig helps us maintain a consistent coding style between different editors and IDEs. This is especially useful when you have many developers/contributors working on the same project.

EditorConfig帮助我们在不同的编辑器和IDE之间保持一致的编码风格。 当您有许多开发人员/贡献者在同一个项目上工作时,此功能特别有用。

You don’t want someone to push code with spaces instead of tabs, or vice versa, CRLF as line endings instead of LF, or vice versa.

您不希望有人用空格而不是制表符来推送代码,反之亦然,CRLF作为行尾而不是LF来反之亦然。

Let’s create the.editorconfig file at the root level. Feel free to switch between CRLF and LF, tabs and spaces, etc.. it all depends on your coding style.

让我们在根级别创建.editorconfig文件。 可以在CRLF和LF,制表符和空格等之间自由切换。这完全取决于您的编码样式。

root = true
[*]
insert_final_newline = false
charset = utf-8
end_of_line = lf
[*.{js,html}]
indent_size = 4
indent_style = tab
trim_trailing_whitespace = true
[{package.json,bower.json,.jscs.json}]
indent_style = space
indent_size = 2
[*.sh]
end_of_line = lf

Depending on your code editor, you might need to download a plugin for editorConfig.

根据您的代码编辑器,您可能需要下载 editorConfig的插件。

This is also convenient when you are working on more than 1 project using the same text editor and each project has different coding style guidelines.

当您使用同一个文本编辑器处理多个项目时,并且每个项目都有不同的编码样式准则时,这也很方便。

捷迅 (JSHINT)

Jshint is a Javascript code quality tool that helps to detect errors and potential problems in Javascript code.

Jshint是Javascript代码质量工具,可帮助检测Javascript代码中的错误和潜在问题。

It also enforces coding conventions on your team.

它还在您的团队上执行编码约定。

We need to create a .jshintrc file at the root level of the project. You can browse the available options for jshint here. Note that when you add a .jshintrc file, the angular task we have in our gulpfile will not recompile our code if it doesn’t validate according to jshint.

我们需要在项目的根目录下创建一个.jshintrc文件。 您可以在此处浏览jshint的可用选项。 请注意,当您添加.jshintrc文件时,如果它未根据jshint进行验证,则在gulpfile中具有的angular任务将不会重新编译我们的代码。

Here’s a recommended jshintrc for our scenario. Feel free to modify it according to your coding style.

这是针对我们的方案的推荐的jshintrc 。 随时根据您的编码样式对其进行修改。

{
"browser": true,
"bitwise": true,
"immed": true,
"newcap": false,
"noarg": true,
"noempty": true,
"nonew": true,
"maxlen": 140,
"boss": true,
"eqnull": true,
"eqeqeq": true,
"expr": true,
"strict": true,
"loopfunc": true,
"sub": true,
"undef": true,
"globals": {
"angular": false,
"describe": false,
"it": false,
"expect": false,
"beforeEach": false,
"afterEach": false,
"module": false,
"inject": false
}
}

JSCS (JSCS)

JSCS is a code style linter for programmatically enforcing your style guide.

JSCS是用于以编程方式实施样式指南的代码样式标记。

We’re going to create a .jscs.json file at the root level. Feel free to modify it depending on your style.

我们将在根级别创建一个.jscs.json文件。 随时根据您的样式进行修改。

{
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do"
],
"requireSpaceAfterKeywords": [
"if",
"for",
"while",
"do",
"switch",
"return"
],
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowTrailingWhitespace": true,
"disallowMixedSpacesAndTabs": true,
"requireMultipleVarDecl": true,
"requireSpacesInsideObjectBrackets": "all",
"requireSpaceBeforeBinaryOperators": [
"+",
"-",
"/",
"*",
"=",
"==",
"===",
"!=",
"!=="
],
"disallowSpaceAfterPrefixUnaryOperators": [
"++",
"--",
"+",
"-"
],
"disallowSpaceBeforePostfixUnaryOperators": [
"++",
"--"
],
"disallowKeywords": [
"with"
],
"disallowKeywordsOnNewLine": [
"else"
],
"excludeFiles": ["node_modules/**"]
}

PHPCS (PHPCS)

Just like jshint, we need to be able to enforce code cleanliness and consistency for our PHP files.

就像jshint一样,我们需要能够对PHP文件强制执行代码整洁性和一致性。

Let’s start by installing phpcs globally:

让我们从全局安装phpcs开始:

composer global require "squizlabs/php_codesniffer=*"

Now we can use the following command to check the app folder:

现在我们可以使用以下命令来检查app文件夹:

phpcs --standard=psr2 app/

The cool thing here is that we can use PSR2 as a coding standard which is used by Laravel, so we don’t have to set up a custom configuration file.

这里很酷的事情是我们可以将PSR2用作Laravel使用的编码标准,因此我们不必设置自定义配置文件。

吊钩 (Git hooks)

Jshint and jscs are great tools, but they need to be automatically enforced or else we’ll forget to lint our code.

Jshint和jscs是很棒的工具,但是它们需要自动执行,否则我们会忘记整理代码。

You can optionally install the corresponding linter plugins for your text editor or IDE, but one of the recommended ways of doing it would be to run these linters as part of your git commit process.

您可以选择为文本编辑器或IDE安装相应的linter插件,但是推荐的一种实现方法是在git commit过程中运行这些linter。

Create .git/hooks/pre-commit if it does not exist and add the following:

如果.git/hooks/pre-commit不存在,请创建并添加以下内容:

#!/bin/sh
jscs angular/**/*.js
jshint angular/**/*.js
phpcs --standard=psr2 app/
exec 1>&2

Then run chmod +x .git/hooks/pre-commit.

然后运行chmod +x .git/hooks/pre-commit

Don’t forget to add this for each developer who joins your team, and every time someone pushes, they’ll be automatically warned of possible issues.

不要忘了为加入您团队的每个开发人员添加此代码,每当有人按下按钮时,系统都会自动警告他们可能出现的问题。

结论 (Conclusion)

This article helped us set up a scalable Laravel and Angular Material app. You can also grab the source code of this tutorial on github: laravel5-angular-material-starter. If you’ve been using Angular with Bootstrap, I’d recommend you give Angular Material a try. Do you have any questions? I’d love to know what you think. Just let me know in the comments!

本文帮助我们建立了一个可扩展的Laravel和Angular Material应用程序。 您也可以在github上获取本教程的源代码: laravel5-angular-material-starter 。 如果您一直在将Angular与Bootstrap结合使用,建议您尝试一下Angular Material。 你有任何问题吗? 我很想知道你的想法。 请在评论中让我知道!

翻译自: https://www.sitepoint.com/flexible-and-easily-maintainable-laravel-angular-material-apps/

angular手机应用

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

相关文章

  1. Angular如何在模板驱动表单中自定义校验器

    引言 模板驱动表单相比较响应式表单可以少更少的代码做同样的事情&#xff0c;可也损失了自由度与更易测试&#xff0c;当然很多人并不在乎啦。 所以我相信很多人在编写Angular不自由自主去更倾向于模板驱动表单的写法。 表单最核心的是校验体验&#xff0c;在Angular中简直就是…...

    2024/4/21 4:12:41
  2. Angular:发送手机验证码按钮倒计时效果实现

    1.组件中定义两个变量&#xff0c;分别用于控制按钮是否可以点击&#xff08;countDown&#xff09;和按钮上的倒计时数字&#xff08;countDownTime&#xff09;&#xff1a; countDown false;countDowmTime 60; // 这里设置倒计时为60SshowButtonText 发送短信验证码&am…...

    2024/4/21 4:12:40
  3. Angualr 当前模块组件引入其他(公共)模块的组件

    问题说明 假设我有topics模块 和 share模块。 现在我想在tipics模块下的topics组件里面应用share模块里的header组件 解决方案 首先将share模块下的header组件导出 在topics模块下将share模块引入 最后在topics组件中引用header组件并设计好路由 查看结果...

    2024/5/3 2:12:05
  4. Angular 创建组件

    创建组件 命令创建 创建组件 定义hello.component.ts组件在app.module.ts中引用并添加到declarations声明中在app.component.html中使用组件<app-hello></app-hello>命令创建 安装Angular 5 Snippets,输入命令ng-component自动生成组件结构使用ng命令自动创建模…...

    2024/4/21 4:12:37
  5. angular4.0创建组件出现错误

    angular4.0创建组件出现错误 用 ng g component navbar 创新navbar 组件时&#xff0c;出现以下错误&#xff1a; 原因&#xff1a;.angular-cli.json文件里面加入了注释导致错误如下 去掉注释后正常 posted on 2017-10-17 11:26 麦田里的包米 阅读(...) 评论(...) 编辑 收藏 转…...

    2024/4/20 19:53:16
  6. Angular 注册组件到指定Path,注册组件到指定模块

    ng g c cloud-book-list2/create-or-edit-book -m cloud-book-list2 转载于:https://www.cnblogs.com/start2019/p/11470621.html...

    2024/4/20 19:53:15
  7. 智能卡脱机支付交易流程分析

    1、引言国内CPU智能卡越来越普及,使用范围也越来越广泛,种类也越来越多,有公共交通卡、社保卡、金融卡等等。依托CPU智能卡的高安全性,一般都能支持脱机支付交易,也即无需实时联接后台系统就能完成支付交易,那么脱机支付应该关注的技术要点有那些,本文将着重对此CPU智能…...

    2024/4/20 19:53:15
  8. angular公共组件声明和使用

    如果要声明一个公共组件&#xff0c;在app.module.ts中引入&#xff0c;declarations元数据数组中声明。这样所有属于AppModule模块的其他组件模板都可以使用。 注意红字部分&#xff0c;在app.module.ts中声明公共组件&#xff0c;只有属于AppModule模块的其他组件的才能使用…...

    2024/4/20 19:53:13
  9. angular删除组件(使用cli删除组件的最佳方法)

    目前Angular CLI不支持删除组件的选项&#xff0c;您需要手动完成。 从app.module中删除每个组件的导入引用删除组件文件夹。...

    2024/4/24 17:37:09
  10. angular封装公共组件

    第一次封装公共组件&#xff0c;也是遇到很多问题啊。记下困扰我当时很长时间的问题 错误 core.js:14597 ERROR Error: Uncaught (in promise): Error: Template parse errors: Can’t bind to ‘list’ since it isn’t a known property of ‘app-ba-page-search’. If ‘…...

    2024/4/21 4:12:36
  11. es6 filter() 数组过滤方法总结

    这篇文章主要介绍了es6 filter() 数组过滤方法总结&#xff0c;文中通过示例代码介绍的非常详细&#xff0c;对大家的学习或者工作具有一定的参考学习价值&#xff0c;需要的朋友们下面随着小编来一起学习学习吧 Array.every(x>x)是每一个都要满足 Array.some(x>x)是有…...

    2024/4/21 4:12:35
  12. angular入门06 : 过滤器

    过滤器用来格式化需要展示给用户的数据。AngularJS有很多实用的内置过滤器&#xff0c;同时也提供了方便的途径可以自己创建过滤器&#xff08;自定义过滤&#xff09;。比如&#xff1a;页面中需要把显示的字母转换为大写&#xff0c;或者是把日期变成良好的格式。 一、内置过…...

    2024/4/21 4:12:34
  13. angular中的那些事儿---过滤器

    过滤器&#xff08;filter&#xff09;正如其名&#xff0c;作用就是接收一个输入&#xff0c;通过某个规则进行处理&#xff0c;然后返回处理后的结果。主要用在数据的格式化上&#xff0c;例如获取一个数组中的子集&#xff0c;对数组中的元素进行排序等。ng内置了一些过滤器…...

    2024/4/23 5:49:04
  14. angular中的常见过滤器

    一、什么是过滤器&#xff1f; 过滤器用来格式化需要展示给用户的数据。 AngularJS有很多实用的内置过滤器&#xff0c;同时也提供了方便的途径可以自己创建过滤器。 在HTML中的模板绑定符号{{ }}内通过|符号来调用过滤器。 例如&#xff0c;假设我们希望将字符串转换成大写…...

    2024/4/21 4:12:32
  15. angular 常用过滤器

    1.lowercase {{lowercase_expression|lowercase}} $filter(‘lowercase’)(stringValue) Example: $filter(‘lowercase’)(‘ABC’) //abc 2.uppercase {{uppercase_expression|uppercase}} $filter(‘uppercase’)(‘abc’) //ABC 3.currency {{currency_expression|…...

    2024/4/21 4:12:30
  16. 数组的添加和删除过滤方法总结es6 filter()

    es6 filter() 数组过滤方法总结 Array.every(x>x)是每一个都要满足 Array.some(x>x)是有一个满足。 Array.find&#xff08;findIndex)&#xff0c;返回符合条件的第一个值。 Array.filter&#xff08;过滤成新的数组&#xff09; **数组的方法find和filter var aa[…...

    2024/4/21 4:12:29
  17. Angular 学习之 filter

    Angular 学习之 数组filter 1 简介 Angular 提供了很多filter&#xff0c;其中一种就叫做filter&#xff0c;可以选取数组中的部分元素&#xff0c;并返回一个新的数组。 2 用法 可以在html或者js中使用。用法如下&#xff1a; {{ filter_expression | filter:expression:…...

    2024/4/21 4:12:29
  18. Angular学习(6)- 数组双向梆定+filter+directive

    示例&#xff1a; <!DOCTYPE html> <html ng-app"MyApp"> <head><title>Study 6</title><script type"text/javascript" src"js/angular.js"></script> </head> <body><div ng-contro…...

    2024/4/21 4:12:27
  19. AngularJs获取链接中的参数

    1、被获取的链接 http://localhost:8080/channel-manager-web/unifiedPlayNewService/broadcastingManageNew?type1 2、配置一个config&#xff0c;如下图 config([$locationProvider, function ($locationProvider) { $locationProvider.html5Mode(true); …...

    2024/5/2 16:53:01
  20. 用ActivatedRoute获取url中的参数

    突然让我用ActivatedRoute import {Injectable} from "angular/core"; import {ActivatedRoute} from "angular/router";import {Subscription} from "rxjs/Rx"; import {UserModel} from "./shared/user.model";Injectable() export …...

    2024/4/21 4:12:25

最新文章

  1. 苹果可能将OpenAI技术集成至iOS/iPadOS 18

    &#x1f989; AI新闻 &#x1f680; 苹果可能将OpenAI技术集成至iOS/iPadOS 18 摘要&#xff1a;苹果正在与OpenAI就将GPT技术部署在iOS/iPadOS 18中进行谈判。这项技术被视为可能增强的Siri功能&#xff0c;即“AI聊天机器人”。除Siri外&#xff0c;新技术还可能改善Spotl…...

    2024/5/3 5:17:27
  2. 梯度消失和梯度爆炸的一些处理方法

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

    2024/3/20 10:50:27
  3. Linux mount用法

    在Linux系统中&#xff0c;系统自动挂载了以下挂载点&#xff1a; /: xfs文件系统&#xff0c;根文件系统, 所有其他文件系统的挂载点。 /sys: sysfs文件系统&#xff0c;提供内核对象的信息和接口。 /proc: proc文件系统&#xff0c;提供进程和系统信息。 /dev: devtmpfs文件系…...

    2024/5/2 2:43:39
  4. 解析大语言模型训练三阶段

    大语言模型的训练过程一般包括3个阶段&#xff1a;预训练&#xff08;Pre-training&#xff09;、SFT&#xff08;有监督的微调&#xff0c;Supervised-Finetuning&#xff09;以及RLHF&#xff08;基于人类反馈的强化学习&#xff0c;Reinforcement Learning from Human Feedb…...

    2024/5/2 22:48:30
  5. 【外汇早评】美通胀数据走低,美元调整

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

    2024/5/1 17:30:59
  6. 【原油贵金属周评】原油多头拥挤,价格调整

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

    2024/5/2 16:16:39
  7. 【外汇周评】靓丽非农不及疲软通胀影响

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

    2024/4/29 2:29:43
  8. 【原油贵金属早评】库存继续增加,油价收跌

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

    2024/5/2 9:28:15
  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/30 9:43:09
  13. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

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

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

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

    2024/5/2 15:04:34
  15. 【外汇早评】美伊僵持,风险情绪继续升温

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

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

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

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

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

    2024/4/29 20:46:55
  18. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

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

    2024/4/30 22:21:04
  19. 氧生福地 玩美北湖(下)——奔跑吧骚年!

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

    2024/5/1 4:32:01
  20. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

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

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

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

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

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

    2024/4/30 9:42:22
  23. 广州械字号面膜生产厂家OEM/ODM4项须知!

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

    2024/5/2 9:07:46
  24. 械字号医用眼膜缓解用眼过度到底有无作用?

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

    2024/4/30 9:42:49
  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