Giter VIP home page Giter VIP logo

ama's Introduction

ama's People

Contributors

sindresorhus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

elemino

ama's Issues

angular-ui/bootstrap ratting issue on collection-repeat ionic

I am using angular-ui/bootstrap the component Rating (ui.bootstrap.rating). my issue that max proporty isnt working correctly when I am using collection-repeat, its shows me always only one icon max, Also when I trying to play with pro of collection-repeat then search some time showing less icons.but If I an using ng-repat all works great. this my code:


<li class="item"  collection-repeat=" contact in contacts |filter: data.searchText">
      <!--<li class="item" ng-repeat=" contact in contacts |filter: data.searchText">-->
        <div class="row  larger font">

            <div  class ="col" ng-init="contact.active"><uib-rating ng-model="contact.active" max={{contact.total}} state-on="'ion-person-stalker positive '" state-off="'ion-person-stalker'" ng-click="changeActive(contact);data.searchText =''"></uib-rating> </div>
the basic link for code of it plnkr this is without collection repeat

http://codepen.io/vitaly87/pen/MeweJB?editors=0001

UPDATE: link with example updated.

link to q:

http://stackoverflow.com/questions/37577984/angular-ui-bootstrap-ratting-issue-on-collection-repeat-ionic?noredirect=1#comment62708258_37577984

How to write unit test for Ionic 4 when the component has child routes?

Failing test log

ClientsPage should create FAILED
        Error: StaticInjectorError(DynamicTestModule)[IonRouterOutlet -> ChildrenOutletContexts]:
          StaticInjectorError(Platform: core)[IonRouterOutlet -> ChildrenOutletContexts]:
            NullInjectorError: No provider for ChildrenOutletContexts!
            at NullInjector.get (webpack:///./node_modules/@angular/core/fesm5/core.js?:1360:19)
            at resolveToken (webpack:///./node_modules/@angular/core/fesm5/core.js?:1598:24)
            at tryResolveToken (webpack:///./node_modules/@angular/core/fesm5/core.js?:1542:16)
            at StaticInjector.get (webpack:///./node_modules/@angular/core/fesm5/core.js?:1439:20)
            at resolveToken (webpack:///./node_modules/@angular/core/fesm5/core.js?:1598:24)
            at tryResolveToken (webpack:///./node_modules/@angular/core/fesm5/core.js?:1542:16)
            at StaticInjector.get (webpack:///./node_modules/@angular/core/fesm5/core.js?:1439:20)
            at resolveNgModuleDep (webpack:///./node_modules/@angular/core/fesm5/core.js?:8667:29)
            at NgModuleRef_.get (webpack:///./node_modules/@angular/core/fesm5/core.js?:9355:16)
            at resolveDep (webpack:///./node_modules/@angular/core/fesm5/core.js?:9720:45)

Spec file

import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ClientsPage } from './clients.page';
import { MenuController, IonicModule } from '@ionic/angular';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

describe('ClientsPage', () => {
  let component: ClientsPage;
  let fixture: ComponentFixture<ClientsPage>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ClientsPage],
      providers: [{ provide: MenuController, useValue: {} }],
      schemas: [CUSTOM_ELEMENTS_SCHEMA],
      imports: [IonicModule]
    }).compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(ClientsPage);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});

Component

import { Component, OnInit } from '@angular/core';
import { MenuController } from '@ionic/angular';

@Component({
  selector: 'app-clients',
  templateUrl: './clients.page.html',
  styleUrls: ['./clients.page.scss']
})
export class ClientsPage implements OnInit {
  constructor(public menuController: MenuController) {}

  ngOnInit() {}
}

Component Template

<ion-header>
  <ion-toolbar color="dark">
    <ion-buttons slot="start">
      <ion-menu-button></ion-menu-button>
    </ion-buttons>
    <ion-title> Clients </ion-title>
  </ion-toolbar>
</ion-header>
<ion-content margin-top> 
  <ion-router-outlet></ion-router-outlet> 
</ion-content>

Module

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ClientListComponent } from './client-list/client-list.component';
import { ClientDetailComponent } from './client-detail/client-detail.component';
import { ClientsPage } from './clients.page';
import { RouterModule, Route } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { FormsModule } from '@angular/forms';
import { AdminClientService } from './admin-client.service';

@NgModule({
  imports: [
    IonicModule,
    CommonModule,
    FormsModule,
    RouterModule.forChild([
      {
        path: '',
        component: ClientsPage,
        children: [
          {
            path: '',
            component: ClientListComponent
          },
          {
            path: ':id',
            component: ClientDetailComponent
          }
        ]
      }
    ])
  ],
  declarations: [ClientsPage, ClientListComponent, ClientDetailComponent],
  providers: [AdminClientService]
})
export class ClientsModule {}

Ionic 2 and NgModule

Hi Mike,

I have a question about Ionic 2 in combination with Angular 2 modules. Now, when Ionic 2 uses Angular 2 final, it's theoretically possible to build modular application architecture.

My question is, will modular application architecture work in Ionic 2 in the same way it works in Angular 2 and is there something else in addition to keep in mind? Some Ionic specific issues, limitations, etc.?

Angular has updated style guide which includes modules and recommendations how to use them (app root module, core module, shared module, feature modules etc.). There are also some considerations to keep in mind, like where to put shared services between modules and where to put shared components/directives/pipes, so they work properly with lazy loaded modules and dependency injection.
Is this all the same for Ionic 2 project, with the same things to keep in mind?

Thanks in advance for your time!

my colleagues and i want to translate the book learning ionic you wrote

hi mike:
i am a mobile app developer from china,i am using ionic framework to develope,i also read your book learing ionic ,but i had not find the book in chinese,so this morning ,l chated with my colleagues and recommend this book to them,i also propose an idea that we can translate this book into chinese. during this working,we can improve our skills and we can also let more and more developer who come from china know ionic and use it.
there are some questions ,1.had any else translate your book into chinese?2. this is my first time want to translate an english book into chinese, what else should we do ?

What's your monthly income?

No I would like to know a lot more =) Not sure if I had to open plenty of issues or this is gonna work too?

personal

  • Where you live?
  • How big is the Apartment?
  • Do you live together with other people in that Apartment?
  • How much does your Apartment cost?
  • When you started coding?
  • Why you started coding?
  • How did you came to ionic?
  • How much is your monthly income?
  • How much money you have left at the end of the month?
  • Are you working 100% at ionic?
  • How much you go in the ionic office per week?
  • How long is your workday?
  • What music do you listen?
  • Do you have a wife?
  • Do you have kids?
  • Do you have a car?
  • Are you happy?

techy

  • How do you feel about ionic-1 (ng-1)?
  • How do you feel about ionic-2/3 (ng-2+)?
  • How do you feel about ionic-4 (web-components)?

ionic ama =)

  • How does ionic generate an income?
  • Does the ionic-premium stuff cover the costs of all employees?

How to create real-time messaging with Ionic?

Hey Mike,

I'm working on a social network app for a client using Ionic for front end, and Node.JS / Express.JS for back end.

I was wondering what is the ideal way to implement real time messaging in the app. I understand Socket.io is good for having a chat room with a lot of people in it. But what I'm trying to do is have 1-on-1 messaging like Facebook Messaging or Google Hangouts.

Do you have any suggestions in mind?

Thanks in advance!

Upload video capture to S3

Hello,

I'm trying to upload a video capture to my S3 Bucket, but I can't do it.

Maybe I need to configure my bucket, I already allowed POST / PUT / GET in my CORS configuration. I don't know if my policy need to be the same as the policy of my bucket.

Here my code:

'use strict';

app.controller('VideoCtrl', function($scope, $cordovaCapture, $state, $cordovaFileTransfer) {

$scope.record = function(){
var options = { limit: 1, duration: 8 };
$cordovaCapture.captureVideo(options).then(
function(videoData) {
var i, path, len;
var pathtogo;
var pathtogostring;
for (i = 0, len = videoData.length; i < len; i += 1) {
path = videoData[i].fullPath;
pathtogo = path.toString();
$scope.videos.$add(pathtogo);
};
},
$state.go('tab.photo-detail'),

  function(err) {
  }
);
var options = new FileUploadOptions();
options.fileKey="file";
var fileName = "capturedvideo.MOV";
options.fileName = fileName;
options.mimeType ="video/mov";
options.chunkedMode = false;

  var uri = encodeURI("https://<my bucket>.amazonaws.com/");

  var policyDoc = "js/signing-util.js";
  var signature = "js/signing-util.js";
  var params = {
    "key": "file",
    "AWSAccessKeyId": "<MY AWS Key>",
    "acl": "public-read",
    "policy": policyDoc,
    "signature": signature,
    "Content-Type": "video/mov"
  };
  options.params = params;

  $cordovaFileTransfer.upload(videoData[i].fullPath, uri, options)
            .then(function(result) {
                console.log("SUCCESS: " + JSON.stringify(result.response));
            }, function(err) {
                console.log("ERROR: " + JSON.stringify(err));
            }, function(progress) {
                // constant progress updates
            });
};
});

My signature / policy doc is this:

var crypto = require('crypto'),
secret = "",
policy,
policyBase64,
signature;

policy = {
"expiration": "2050-12-31T12:00:00.000Z",
"conditions": [
{"bucket": ""},
["starts-with", "$key", ""],
{"acl": 'public-read'},
["starts-with", "$Content-Type", ""],
["content-length-range", 0, 5242880000]
]
};

policyBase64 = new Buffer(JSON.stringify(policy), 'utf8').toString('base64');
console.log("Policy Base64:");
console.log(policyBase64);

signature = crypto.createHmac('sha1', secret).update(policyBase64).digest('base64');
console.log("Signature:");
console.log(signature);

Is something wrong with my code?

PLUS:
I use the default cordova-platform iOS @3.9.2 but every time I got access to my camera on device (iPhone 6 - iOS 9) I receive this error:
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.

Is only a warning issue or is not capturing the video?

Thanks.

Ionic Deep Link not working in tab view

I am facing DEEP link issue in ionic 3 development
Our app pages are build with tabbed interface. So that DEEP link is not working this architecture i.e the main issue is the tabs are not visible in the page when app is opened with deep link. I am using ionic native deep link plugin . I have also tried branch deep link solution but even that is also showing same issue.

In my research, I have identified that the page which we referring to open is getting pushed out of the 'tab view'. See the blue marked ionic page (our pushed page) below, we believe that if we can push the page under ionic tab nodes would resolve the issue.

Have you come across these kind of issue with ionic 3 development ? and any solution to resolve this issue would always be appreciated. Thank You.

screen shot 2018-04-05 at 12 14 35 pm

Deep Link Implementation Code Snippet

screen shot 2018-04-05 at 12 20 35 pm

Proper .gitignore for Ionic

Hi!

First of all, thanks for all the work at Ionic!

What rules are you using for your .gitignore in Ionic? Mine looks like this but not sure if I forgot stuff...

node_modules/
platforms/
plugins/

resources/*/*

Ionic and Lazy Loading Pt 2?

Hi. I recently started working on Ionic project and I really enjoyed your "Ionic and Lazy Loading Pt 1" blog. So, thanks!

Just wanted to see when the part 2 will come! =)

Dotfiles - neovim2 and searching strings

Hi and thanks for making a neovim video and sharing your dotfiles. I'm a newbie in vim/tmux but want to give it a spin to see if it's something that could improve my workflow.

I got two questions about your dotfiles:

  1. When I open up nvim and try to search for files <c-p>, I get this error: Invalid source name "file_rec/neovim2" is detached. If I change it to file_rec/neovim in init.vim it works, what do I miss?
  2. Have you set up a way to search for strings inside files in working directory?

Thanks again for being open and sharing!

When would you recommend switching up to ionic 2?

Hey Mike,
I know you probably get this question asked a lot, but I wasn't able to find any answer after Angular 2 beta got released back in December. Would you recommend switching up as soon as ionic 2 beta is released? But until then, is there any particular way ionic 1 apps could be built so they are easier to upgrade if necessary? Lastly, is there any (incredibly) rough date you're planning for the beta release, say, 3 months, 6 months, a year, etc?

Thanks!
Have a nice day.

hi i need help with ionic 2 auth

hi, i see you on many formus and u are so pro... for this reason can u help me how i can build a app with ionic 2 and auth - webservice

ionic gesture on canvas

do you have a demo for ionic that can be put inside the canvas? for example i choose a picture from gallery and the picture will go into that canvas and then i can resize it using the gestures?

thanks a lot!

Push notification badge count not showing on android

We are developing a mobile app with Ionic 2 and use push notifications, that works fine but icon badge not showing and indicating the count in ANDROID devices.

01. Cloud Setting

const cloudSettings: CloudSettings = {
  'core': {
    'app_id': 'xxxxxxxx',
  },
  'push': {
    'sender_id': 'xxxxxxxxxx',
    'pluginConfig': {
      'ios': {
        'badge': true,
        'sound': true
      },
      'android': {
        'iconColor': '#fff',
      }
    }
  }
};

02. API POST: https://api.ionic.io/push/notifications

{
    "tokens": [TOKEN]
    "profile": "PROFILETAG",
    "notification":
    { 
        "message":"Hi this is a push notification", 
        "title": "Rio", 
        "android": {"payload": {"sound": "false","badge": "1"}}, 
        "ios": {"payload": {"sound": "true","badge": "1}}
    }
}

Any idea to fix this issue would be a great help!

Ionic test tool

Hey, i'm new to ionic and i'm looking for a new way to do tests. How do you test the screen positioning? Is it possible to use protractor to test ionic apps or do you recommend another one?

Thanks!

How useful is vim/neovim in production software

I learnt how to use vim and used it for developing software (small projects). I have this notion that vim will not go a long way in developing large products, the way other text editors like VScode or atom would. I want to know what you think about this. And if you have any advice for me on using vim for producing large software.

help

hi, please help me to Create a space for a member association website with ionic .
thank you in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.