This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Service1 } from './service1.service'; | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { FormsModule } from '@angular/forms'; | |
import { HttpModule } from '@angular/http'; | |
import { AppComponent } from './app.component'; | |
import { Component1Component } from './component1/component1.component'; | |
@NgModule({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Service2 } from './service2.service'; | |
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'], | |
providers: [Service2] | |
}) | |
export class AppComponent { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Service1 } from './service1.service'; | |
import { Injectable } from '@angular/core'; | |
@Injectable() | |
export class Service2 { | |
constructor(private service1: Service1) { } | |
do(){ | |
this.service1.doSomethingFromService1(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
@Injectable() | |
export class Service1 { | |
constructor() { } | |
doSomethingFromService1(){ | |
console.log('service 1 just did something'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
''' | |
Module that runs pylint on all python scripts found in a directory tree.. | |
''' | |
import os | |
import re | |
import sys | |
total = 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Obs1: m2m_changed never trigger the remove signal (pre_remove, post_remove) when deleted, so this ways you can force he do it | |
obs2: Since the pre_clear data will be removed anyways to new valuei n post_add add it again and when you fully remove data | |
the add events wont be trigger, so this solution will simule the exacly action the m2m_changed should do | |
''' | |
class OtherModel(model.Models) | |
pass | |
class MyModel(model.Models): | |
m2m_attribute = models.ManyToManyField(OtherModel,related_name='other_model', blank=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"files.exclude": { | |
"**/.git": true, | |
"**/.svn": true, | |
"**/.hg": true, | |
"**/.DS_Store": true, | |
"**/**.map":true, | |
"**/**.pyc": true | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getUrlParameter(sParam) { | |
var sPageURL = decodeURIComponent(window.location.search.substring(1)), | |
sURLVariables = sPageURL.split('&'), | |
sParameterName, | |
i; | |
for (i = 0; i < sURLVariables.length; i++) { | |
sParameterName = sURLVariables[i].split('='); | |
if (sParameterName[0] === sParam) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules/ | |
platforms/ | |
plugins/ | |
temp/ | |
*.DS_Store | |
*.log | |
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta http-equiv="Content-Security-Policy" | |
content="default-src *; | |
script-src 'self' 'unsafe-inline' 'unsafe-eval' | |
localhost:*; | |
style-src 'self' 'unsafe-inline' | |
localhost"> |
NewerOlder