Problem
What to look for when using dependency injection
What services are generally used to do
What is the general use of directives?
Angular2 How to extract public components
Angular2 why not need to mention public components
How to communicate between parent and child components
When should I use Ngmodel?
Why do you use typescript? I like JavaScript.
Why do I have
1. ModularComponent-based programming is a trend in web development, and ANGULAR2 provides an efficient and simple way to develop components so that program development pays more attention to the implementation of business logic, without caring about how to load components and modules, how to reference and dependency injection implementations, and so on.As shown in the following code, ANGULAR2 provides anno
JQuery makes it easier to manipulate the DOM. Due to its ease of use and scalability, Jquer also quickly swept the world, a variety of plug-ins are also dizzying.I'm sure a lot of people don't go straight from jquery to the front, because it's so easy to use, and most of what we used to do is based on jquery and its plugins. And now Angular2 's component ecology is not perfect, we may want to use jquery when writing angular. This article provides a br
I know Angular2 's idea of using jquery might see a little bit of an odd lot of you, and we all know that ANGULAR2 is responsible for managing everything related to our view components and DOM elements, which sounds like a good idea, and a working corner made with another frame can be easily done.In other words, why would anyone want jquery and ANGULAR2 integrati
Today we are going to talk about the second part of the NG2 route, including the knowledge points of routing nesting, routing life cycle, and so on.ExampleThe example is still an example of the previous lesson:Last lesson, we explained the Hero list, this lesson we explain the crisis center.Source:Https://github.com/lewis617/angular2-tutorial/tree/gh-pages/routerHow to run:Run under the root directory:Http-serverRouting NestingWe defined the routing U
A module in ANGULAR2 refers to a class that is decorated with @ngmodule. @NgModule use a metadata object to tell angular how to compile and run the code. A module can contain components, directives, pipelines, and can declare their access rights public so that the components of the external module can access and use them.
module is used to organize the application, through the module mechanism external class library can be very convenient to extend t
Debugging js components during development is always troublesome. The most common method is to use alert or debugger to test the js running status. However, both methods have their own limitations. alert may interrupt, sometimes the values of alert may be unreliable, and the values of alert may be incorrect when you use the closure. Debugger is actually quite difficult to use, and only supports ie. Therefore, the most reasonable method is to output the value to be debugged during the running pro
Poco logger logs use a small analysis
Poco logger logs use a small analysis
Log
Logger Library Selection
A brief analysis of Pocologger architecture
Step life into News
Step Two Write Logger
Step three import Channel
Step four Write file
Use
H file
Logback is built on top of three main classes: Logger,appender and layout. These three components work together to enable developers to record messages by message type and level, and to control the output format and output destination of messages during the program's run time.The logger class is part of the Logback-classic module, and the Appender and layout interfaces come from Logback-core. As a multipurp
Previous Article Angular2 Introductory series Tutorials-Multiple components, master-Slave relationsIn programming, we typically separate the data provided to avoid repeatedly copying the code that pastes the data request during the program's writingThe concept of dependency injection is provided in Angular2 so that we can do it gracefully. Simply described here, dependency injection allows us to write code
Due to the rise of Angular2 soon, the relevant plug-ins are still very few, so sometimes have to use some jquery plug-ins to complete the project,So how do you put the jquery plugin in the angular2? Use custom directives!To introduce jquery before the context, this no longer describesFirst, create a directive that uses the @input method to get the parameters required by the jquery plugin.In Ngonchanges, whe
Log in when the login is successful, you need to put the information into a cookie, NPM install several Angular2-cookie ng2-cookies angular2-cookiesAccording to the above method, always error, method is undefined, Baidu Google no fruitFinally, one of the local storage solutions to LOCALSTORAGE,HTML5, easy to use
Localstorage.setitem (' User ', Json.stringify (this.users));
This.user = Json.pars
The last to do the route part of the hero, there is a URL problem, this time I follow the tutorial inside the vs2015 integrated way to find styleurls: ['./app/app.component.css '] This time can not find, to replace styleurls: [' App.component.css '] .... Are you kidding me? Maybe it's because the file location of ' My-app ' has changed.This does not matter, this time mainly writes the IFRAME question.Vs inside built such a homepageThen My-app element in the Welcome page inside, run, en, page out
Preface
Small series recently in the front-end engineering work, using the ANGULAR2 front-end framework for the project front-end interface reconstruction. And then for the ANGULAR2 project operating principles have some new experience, here and June mutual encouragement. Body
ANGULAR2 directory Structure
Development Create a new folder HelloWorld
mkdir HelloW
Polemo-logger is the log system interface used by the Netease game framework polemo. It encapsulates the log4js-node and has its weakening and enhancement. Detailed description:
Enhancement
Support for multiple prefixes
Row number support
Prefix and line number Color support
The value sources of the configuration item include environment variables, command line parameters, and optional values.
Weakened part (or restricted part)
class Logger
Java.lang.Object
Java.util.logging.Logger
The Logger object is used to record log messages for a particular system or application component. You typically use a dot-delimited hierarchical namespace to name Logger. Logger names can be arbitrary strings, but they should generally be based on the package
Learn Angular2 with me.Course Study Address: http://www.xuetuwuyou.com/course/234The course out of self-study, worry-free network: http://www.xuetuwuyou.comLecturer: Wind Dancing SmokeThe course mainly teaches the popular front-end mainstream framework Angular2, including but not limited to: typescript advanced syntax, object-oriented, modular module mechanism, ANGULAR2
Prepare angular 2 environment
Ng-bootstrap is based on angular 2, so it is necessary to prepare the angular 2 environment first.
Using Ng-bootstrap
Download Ng-bootstrap
Ng-bootstrap uses bootstrap 4.0 ALPHA2, so you need to download the bootstrap first and recommend the form of NPM package:
NPM Install bootstrap@4.0.0-alpha.2--save
Then download the ng-bootstrap and use the same form as NPM package:
NPM Install @ng-bootstrap/ng-bootstrap--save
Modify Systemjs.confi
Scenario:Log Wrapper: slf4j. Each class must pass
[Java]Private static final Logger LOGGER = LoggerFactory. getLogger (ErrorHandler. class );
Private static final Logger LOGGER = LoggerFactory. getLogger (ErrorHandler. class); this non-intelligent hard coding method is used to generate a
Shadowdom-Encapsulating private stylesANGULAR2 uses shadowdom as the rendering basis for the component, which means that the component is rendered to a separate shadow tree, which is good for good encapsulation of DOM objects and styles:The problem is that most browsers, except for Chrome, do not currently support Shadowdom, so ANGULAR2 provides three strategies for rendering templates to the DOM.Taking the following template as an example, we look at
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.